Requirements
Before integrating the AppDNA iOS SDK, ensure your project meets the following minimum requirements:| Requirement | Minimum Version |
|---|---|
| iOS | 16.0+ |
| Swift | 5.9+ |
| Xcode | 16+ |
Installation
Swift Package Manager (Recommended)
Add the AppDNA SDK to your project using Swift Package Manager:- In Xcode, go to File > Add Package Dependencies…
- Enter the repository URL:
- Set the dependency rule to Up to Next Major Version starting from
1.0.54. - Select the
AppDNASDKpackage product and add it to your target.
Package.swift:
CocoaPods
Add the following to yourPodfile:
The pod is published from the
AppDNASDK.podspec in the SDK repository. Make sure your CocoaPods repo is up to date by running pod repo update if the pod is not found.Firebase Configuration
The AppDNA SDK uses Firebase Firestore for real-time configuration delivery (paywalls, experiments, feature flags, onboarding flows). You must add a Firebase configuration file to your project.Step 1: Download GoogleService-Info-AppDNA.plist
- Log into your AppDNA Console
- Go to Settings → SDK
- Click Download Firebase Config to download
GoogleService-Info-AppDNA.plist
Step 2: Add to Your Xcode Project
- Drag
GoogleService-Info-AppDNA.plistinto your Xcode project navigator - Ensure “Copy items if needed” is checked
- Select your app target in the “Add to targets” section
Step 3: Add Background Task Permission
Add the following to your app’sInfo.plist to enable background event uploads:
If your app already uses Firebase for your own services (Realtime Database, Analytics, Crashlytics), AppDNA automatically creates a separate named Firebase instance using
GoogleService-Info-AppDNA.plist. Your existing Firebase setup is not affected. Just add the AppDNA plist alongside your own GoogleService-Info.plist.Dependencies
The following dependencies are automatically included with the SDK. You do not need to add them manually:| Dependency | Version | Purpose |
|---|---|---|
| KeychainAccess | ~4.2.2 | Secure storage for tokens and IDs |
| FirebaseFirestore | ~11.0 | Real-time remote configuration sync |
If your project already includes these dependencies, ensure your version constraints are compatible with the versions listed above. SPM and CocoaPods will resolve version conflicts automatically in most cases.
Lottie and Rive animation support requires adding
lottie-ios and rive-ios as separate SPM dependencies in your project.Verify Installation
After adding the SDK, verify it is correctly installed by importing the module and printing the SDK version:You should see
1.0.54 printed in the Xcode console. If you get a “No such module” error, clean your build folder (Cmd+Shift+K) and rebuild.Troubleshooting
If you encounter issues during integration, callAppDNA.diagnose() after configuration to get a full health report:
| Issue | Fix |
|---|---|
| ❌ API Key: invalid format | Key must start with adn_live_ or adn_test_ |
| ❌ Bootstrap: failed | Check API key and internet connection |
| ❌ Firebase: no secondary app | Add GoogleService-Info-AppDNA.plist to your target |
| ⚠️ Firebase: using default app | Your own Firebase is being used instead of AppDNA’s — add GoogleService-Info-AppDNA.plist |

