Project setup (iOS)¶
The IDK depends on a number of system functions which may require additional project setup if not already configured.
The IDK requires device camera access as several flows depend on it (e.g. QR code scanning, taking selfies, and capturing documents). For this reason, please make sure the
NSCameraUsageDescription string is included in the app's Info.plist file.
The IDK makes use of NFC to scan identity documents. For this reason, please make sure the following items are included in the app's Info.plist file:
- A list of application identifiers for NFC Tag Reader Session:
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key> <array> <string>A0000002471001</string> <string>A00000045645444C2D3031</string> </array>
The IDK uses push notifications to notify the app about external events (e.g. log in authorization requests and purchase status changes). The IDK is not able to enable push notification support on its own, so this must be configured in the app itself.
Please refer to the Apple documentation to support this function in the mobile app.
- Inside your project in the Firebase console, select the gear icon, select Project Settings, and then select the Cloud Messaging tab.
- In APNs authentication key under iOS app configuration, click the Upload button.
- Browse to the location where you saved your key, select it, and click Open. Add the key ID for the key (available in the Apple Developer Member Center) and click Upload.
- Continue with these steps to handle received notifications.
To resolve deeplink URLs into IDK flows, the IDK relies on Firebase Dynamic Links, which in turn rely on iOS Universal Links. Please refer to the Apple documentation to support this function in the mobile app.
- In the Info tab of your app's Xcode project, create a new URL type to be used for Dynamic Links. Set the Identifier field to a unique value and the URL scheme field to be your bundle identifier.
- In the Capabilities tab of your app's Xcode project, enable Associated Domains and add
applinks:your_dynamic_links_domainto the list.
- If you use a fully-custom domain go to your Xcode project's Info.plist file and create a list called
FirebaseDynamicLinksCustomDomains. Set it to your app's Dynamic Links URL prefixes. For example:
To protect backend resources from abuse, the IDK relies on Firebase App Check, which in turn relies on iOS Device Check. Please refer to the Apple documentation to support this function in the mobile app.
Apple developer configuration¶
Initial preparations are done on Apple developer site
DeviceCheck private key:
- From Certificates, Identifiers & Profiles > Keys register a new key with DeviceCheck enabled.
- Download the key for later usage. Be aware, that after downloading your key, it cannot be re-downloaded as the server copy is removed. Be sure to save a backup of your key in a secure place.
App Attest capability to your app for each application which uses IDK, by doing the following in Certificates, Identifiers & Profiles > Identifiers:
- Select an application identifier.
- Save the changes. Adding capabilities will invalidate any provisioning profiles that include this App ID and they must be regenerated for future use.
Rest of preparations are done in App Check section of Firebase console
Register your apps to use App Check with the DeviceCheck provider:
- Open Apps and for each application using IDK do the following:
- Select app and press DeviceCheck.
- In the expanded section, attach previously generated key and fill all necessary fields:
- Key ID (can be found in the Apple Developer Center > Certificates, Identifiers & Profiles)
- Team ID (can be found in the Apple Developer Center > Membership).
- Set TTL to 30 minutes.
- Save the changes.
After configuration is completed, IDK will be able to perform App Check. No code changes required.