ChappieConfiguration.
Default settings
| Field | Default value |
|---|---|
keychainService | "com.chappie.sdk" |
keychainAccount | "default" |
keychainAccessGroup | nil |
keychainAccessibility | .whenUnlockedThisDeviceOnly |
Keychain accessibility options
ChappieKeychainAccessibility maps directly to Security framework kSecAttrAccessible constants:
Default and recommended. The Keychain item is readable only while the device is unlocked. It never leaves the device — not through iCloud Keychain, backups, or migration. Use this for all foreground-only apps.
The Keychain item is readable after the user unlocks the device at least once after a reboot. Background processes (VoIP, background fetch, push-triggered extensions) can read credentials without requiring the screen to be unlocked. This setting still prevents the item from leaving the device.
Setting a custom Keychain service
Override the default service identifier to namespace your credentials separately from the SDK default:Shared Keychain with app groups or extensions
To share credentials between your main app and an extension (Share Extension, Widget, Notification Service Extension), setkeychainAccessGroup to your app group’s shared Keychain identifier. Your app target must have the Keychain Sharing entitlement and list that access group:
TEAMID with your ten-character Apple Developer Team ID and com.example.shared with the group identifier configured in your entitlement file.
Multi-account apps
For apps that support multiple signed-in accounts simultaneously, use a distinctkeychainAccount value per user. Each value creates a separate Keychain item under the same service, so accounts do not interfere with one another:
Raw access tokens, refresh tokens, and OAuth internals are never surfaced through Chappie’s public API.
ChappieAuthSession exposes an auth state enum and ChappieAccountInfo (email, user ID, account ID, plan) — never the underlying bearer token. This prevents accidental token logging or transmission through app code.