Install SDK
Learn how to download and install the iOS SDK.
Recommended
Get started with our SDK integration wizard
Download and install the SDK
Download and install the iOS SDK with your package manager of choice.
Install using CocoaPods
Step 1: Download CocoaPods
Download and install the latest version of CocoaPods.
Step 2: Add dependencies
Add the latest version of AppsFlyerFramework
to your project's Podfile:
pod 'AppsFlyerFramework'
Step 3: Install dependencies
In your terminal, navigate to your project's root folder and run pod install
.
Step 4: Open Xcode workspace
In Xcode, use the .xcworkspace
file to open the project from this point forward, instead of the .xcodeproj
file.
If you are developing a tvOS app, CocoaPods automatically adds the relevant dependencies from AppsFlyerFramework
.
Install using Carthage
Step 1: Install Carthage
Install the latest version of Carthage.
Step 2: Add dependencies
Add the following line to your Cartfile
binary:
binary "https://raw.githubusercontent.com/AppsFlyerSDK/AppsFlyerFramework/master/Carthage/appsflyer-ios.json"
Currently doesn't support tvOS apps.
Note
The link above links to a static library. If you're upgrading to a newer iOS version, do the following:
- Remove the Run Script stage from Xcode that runs copy-frameworks.
- Make sure the library is not embedded.
To learn more, see Carthage docs.
Install using Swift Package Manager (V6.1.0
+)
V6.1.0
+)Starting V6.1.0
the iOS SDK can be installed via Install using Swift Package Manager (SPM):
Step 1: Navigate to Add Package Dependency
In Xcode, go to File > Add Packages:
Step 2: Add iOS SDK GitHub repository
Enter the AppsFlyer SDK GitHub repository. You can select one of the following:
Step 3: Select SDK version
Step 4: Add AppsFlyerLib to desired Target
Manual install
Step 1: Download static framework
Download the iOS SDK as a static framework.
To verify the integrity of the SDK static framework download, click here.
Step 2: Unzip
Unzip the AppsFlyerLib.framework.zip
file you just downloaded.
Step 3: Import in project
Drag the AppsFlyerLib.framework
folder and drop it into your Xcode project. Make sure Copy items if needed is checked.
Note
This approach is only compatible with iOS 8 and above. For tvOS apps, you need a different
AppsFlyerFramework
:
- Clone this repo.
- Find
AppsFlyerLib.framework
in this folder of the cloned repo.- Repeat step 3.
Native iOS framework dependencies
The SDK automatically adds and uses the following native frameworks:
AdSupport
framework: This framework is required to collect the IDFA from devices. Without IDFA you cannot attribute installs to Meta ads, Twitter, Google Ads, and other networks.AdServices
framework (V6.1.3+
): Measure the performance of Apple Search Ads in your app.iAd
framework: (Deprecated) Measure the performance of Apple Search Ads in your app. Note: TheiAd
framework has not been in use sinceV6.10.1
and completely removed from the code base fromV6.13.0
.
Strict mode SDK
Use the Strict Mode SDK to completely remove IDFA collection functionality and AdSupport framework dependencies (for example, when developing apps for kids).
You can install the Strict mode SDK using one of the following methods.
Install using CocoaPods
pod 'AppsFlyerFramework/Strict'
Install using Carthage
binary "https://raw.githubusercontent.com/AppsFlyerSDK/AppsFlyerFramework/master/Carthage/appsflyer-strict.json" ~> 6.3.2
Install using Swift Package Manager
Follow the steps to install the SDK using Swift Package Manager, and in the repository name, use https://github.com/AppsFlyerSDK/AppsFlyerFramework-Strict
Updated about 2 months ago