Info.plist. You can also override most settings at runtime using Settings.shared.
Info.plist keys
Required keys
The following keys must be present inInfo.plist for the SDK to function correctly.
Your Facebook App ID. The SDK reads this value on launch via
Settings.appID. Find it in your Meta App Dashboard.Your app’s client token, used for certain anonymous API calls that don’t require a user access token. Find it in your app dashboard under Settings → Advanced → Security → Client token.
The display name shown to users during Facebook Login and in sharing dialogs. This should match the name configured in your Meta App Dashboard.
URL scheme allowlist
Declares the URL schemes your app is allowed to query with
canOpenURL. Add all four values so the SDK can detect whether the Facebook app, Messenger, and share extensions are installed.Optional keys
Controls whether the SDK automatically logs app events like You can also set this at runtime:
activateApp and deactivateApp. Set to false to disable automatic logging and call AppEvents.shared.activateApp() manually when appropriate.Controls whether the SDK collects the device’s Advertiser ID (IDFA). If your app does not use the AppTrackingTransparency framework and cannot obtain tracking authorization, set this to Runtime equivalent:
false.Controls whether Aggregated Event Measurement (AEM) is set up automatically on iOS 14+. Set to
false if you want to initialize AEM manually.URL scheme configuration
The SDK uses a custom URL scheme to receive callbacks from the Facebook app and Safari after authentication or sharing flows. Register it inInfo.plist under CFBundleURLTypes:
YOUR_APP_ID with your numeric Facebook App ID. For example, if your App ID is 1234567890, the scheme is fb1234567890.
You can add this URL scheme in Xcode by going to your target’s Info tab, expanding URL Types, and clicking the + button. Set the URL scheme to
fb followed by your App ID.Runtime configuration with Settings
In addition toInfo.plist, you can configure the SDK programmatically through Settings.shared. Set these values before the SDK initializes (before application(_:didFinishLaunchingWithOptions:) returns) to ensure they take effect.
Common Settings properties
| Property | Type | Description |
|---|---|---|
Settings.shared.appID | String? | The Facebook App ID. Defaults to FacebookAppID in Info.plist. |
Settings.shared.clientToken | String? | The client token. Defaults to FacebookClientToken in Info.plist. |
Settings.shared.displayName | String? | The app display name. Defaults to FacebookDisplayName in Info.plist. |
Settings.shared.isAutoLogAppEventsEnabled | Bool | Enables automatic app event logging. Default: true. |
Settings.shared.isAdvertiserIDCollectionEnabled | Bool | Enables IDFA collection. Default: true. |
Settings.shared.isAdvertiserTrackingEnabled | Bool | Reflects ATTrackingManager authorization status on iOS 17+. |
Settings.shared.sdkVersion | String | The current SDK version string (read-only). |
App Transport Security
The Facebook SDK communicates exclusively over HTTPS, so no App Transport Security exceptions are required. Do not addNSAllowsArbitraryLoads to your Info.plist — this would weaken your app’s security posture and may trigger App Store review issues.