Client v5: BLE, BLE Hosting, HTTP, Jobs - Linux, MacOS, & Blazor Support! Full AOT, RX on BLE only & MANY other features! Power up!
Permissions
Shiny.Contacts uses Shiny.Core’s AccessState permission model — the same model used across every Shiny module — rather than a MAUI-specific permission class. IContactStore exposes two members for working with contact access:
// Request access (triggers the OS prompt if needed)var access = await contactStore.RequestAccess();
// Check the current state without promptingvar current = contactStore.GetCurrentAccess();Both return a Shiny.AccessState.
AccessState
Section titled “AccessState”| State | Meaning |
|---|---|
Available | All necessary contact permissions are granted |
Denied | The user denied contact access |
Restricted | Access is granted in a limited fashion (e.g. read-only or write-only), or restricted by parental controls |
Disabled | Contact access has been disabled by the user |
NotSetup | A required manifest/Info.plist entry is missing |
NotSupported | Contacts are not supported on the current platform |
Unknown | Access has not yet been checked, or is in an unknown state |
Android
Section titled “Android”On Android, contact access covers both READ_CONTACTS and WRITE_CONTACTS:
Available— both read and write access grantedRestricted— only read or only write granted (not both)Denied— neither read nor write granted
On iOS, contacts access is effectively all-or-nothing:
Available— contacts access authorizedDenied— contacts access deniedRestricted— contacts access restricted (e.g. parental controls) or limitedUnknown— not yet determined
Typical Usage Pattern
Section titled “Typical Usage Pattern”public class ContactListViewModel(IContactStore contactStore, IDialogs dialogs){ public async Task LoadContacts() { var access = await contactStore.RequestAccess(); if (access != AccessState.Available) { await dialogs.Alert("Permission Required", "Contact access is needed to continue."); return; }
var contacts = await contactStore.GetAll(); // display contacts... }}iOS Notes & Relations Entitlement
Section titled “iOS Notes & Relations Entitlement”Reading and writing the Note and Relationships properties on iOS requires the com.apple.developer.contacts.notes entitlement. The library automatically detects whether this entitlement is present at runtime.
- If absent:
NotereturnsnullandRelationshipsis empty — no errors - If present: full read/write access to notes and relations
To enable, add to Entitlements.plist:
<key>com.apple.developer.contacts.notes</key><true/>