SDK Setup

    SDK Installation


    1. Create a Podfile file with the below commands.

      cd path/to/project
      touch Podfile

    2. Edit Podfile as below.

      target '[Project Name]' do
          pod 'AirBridge', '1.33.4'

      Airbridge iOS SDK 1.18.0+ requires CocoaPods 1.11.0+

    3. Run the following commands in your terminal.

      cd path/to/project
      pod install --repo-update

      When no pod command is found, install cocoapods with the below command. sudo gem install cocoapods

    Swift Package Manager (SPM)

    The iOS SDK can be installed through Swift Package Manager (SPM). SDK versions and 1.24.4+ currently support SPM.

    1. Move to "File" → "Add Packages" in Xcode.

    2. Add the Airbridge iOS SDK
      Search for "" once the "Add Packages" window pops up. Select the version to be installed and click the "Add Package" button.

    3. Select Target for Package Installation.

    4. Check Package Installation.
      Airbridge will be shown under "Package Dependencies" if the SDK was properly installed.

    Direct Installation

    1. Adding the AirBridge.framework

    1. Download AirBridge.framework

    2. Click "Xcode → Project file → General → Frameworks, Libraries, and Embedded Content → +"

    3. Click "Add Other.. → Add Files.." at the bottom right hand corner

    4. Add the AirBridge.xcframeworkfolder that is in the file downloaded at step 1.

    5. Set AirBridge.xcframeworkas "Do not Embed".

    2. Adding Dependency Frameworks

    1. Click "Xcode → Project file → General → Frameworks, Libraries, and Embedded Content → +".

    2. Add the 6 frameworks in the table below.

    3. Set these frameworks as "Do not Embed"

    4. Go to "Xcode → Project file → Build Phase → Link Binary with Libraries".

    5. Set the below six frameworks' statuses to Optional.




    Used to collect IDFA.


    Used to collect Apple search ads attribution.


    Used to collect carrier information.


    Used to collect SKAdNetwork information.


    Used to collect tracking authorization status.


    Used to collect Apple Search Ads attribution information. (iOS 14.3+)

    Project Setup


    Initialize SDK by adding following code at the beginning of the application:didFinishLaunchingWithOptions: method in the AppDelegate file.

    #import <AirBridge/AirBridge.h>
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions {
        [AirBridge getInstance:@"YOUR_APP_TOKEN" appName:@"YOUR_APP_NAME" withLaunchOptions:launchOptions];

    If you're using an environment where AppDelegate doesn't exist (e.g. SwiftUI), you would initialize the SDK through the App class under @main.

    // YourprojectApp.swift
    import SwiftUI
    import AirBridge
    struct OnlyUIApp: App {
        init() {
            AirBridge.getInstance("YOUR_APP_TOKEN", appName: "YOUR_APP_NAME")
        var body: some Scene {
            WindowGroup {

    YOUR_APP_NAME can be found at the "Airbridge dashboard → Settings → Tokens → App Name". YOUR_APP_TOKEN can be found at the "Airbridge dashboard → Settings → Tokens → App SDK Token".

    Accept IDFA Terms and Conditions

    In order to use the SDK, you must agree to the "IDFA terms and conditions" when publishing the application to the App Store.

    1. Click "Yes" to "Does this app use the Advertising Identifier (IDFA)?

    2. Check "Attribute this app Install to a previously served advertisement".

    3. Check "Attribute an action taken within this app to a previously served advertisement".

    4. Check "Limit Ad Tracking Setting in iOS".

    Testing the SDK

    Check if "install" events are being sent when installing and running the application.

    Check in the Airbridge Dashboard

    Events from the SDK are shown on the "Airbridge Dashboard → Raw Data → App Real-time Logs".

    1. Go to "Airbridge Dashboard → Raw Data → App Real-time Logs".

    2. Search for your "iOS IDFA" in the search box.

    Logs may be delayed for up to 5 minutes.

    Check with Logs

    Logs will be printed to Xcode if you insert the following at the beginning of the code that initializes the SDK in your AppDelegate file.

    [AirBridge setLogLevel:AB_LOG_ALL];
    [AirBridge getInstance:@"YOUR_APP_TOKEN" appName:@"YOUR_APP_NAME" withLaunchOptions:launchOptions];

    Dashboard Setup

    The following information is needed at "Airbridge Dashboard → Tracking Link → Deep Link".

    • iOS URI Scheme

    • iOS App ID

    iOS URI Scheme

    Enter the URI scheme that will be used, including ://, in the iOS URI Scheme area as shown in the picture above.

    e.g. example://yoururischeme://


    Airbridge supports lowercase, numbers, and some special characters (-+.) for URI Schemes.

    iOS App ID

    1. Go to Identifiersat

    2. Click identifier of the application that you want to track.

    3. Copy the identifier information to "iOS App ID" at the Airbridge dashboard in the following format: "App ID Prefix" + "." + "Bundle ID" (e.g.

    Project Setup


    1. Go to "Xcode → Project file → Info → URL Types".

    2. From the Airbridge dashboard, copy "iOS URI Scheme" to Xcode's "URL Schemes". (Do not include ://)

    1. Go to "Xcode → Project file → Signing & Capabilities".

    2. Click "+ Capability" and add "Associated Domains".

    3. Add applinks:YOUR_APP_NAME.airbridge.ioto "Associated Domains".

    4. Add applinks:YOUR_APP_NAME.abr.geto "Associated Domains".

    YOUR_APP_NAME can be found at the "Airbridge dashboard → Settings → Tokens → App Name".

    Please refer to Troubleshooting → Webcredentials if you want to use the autofill feature.

    For projects using AppDelegate

    Events are usually sent through the application(_:open:options:) method in AppDelegate for apps that support iOS 12 and below.

    1. Open ios/[Project name]/AppDelegate.

    2. Send deeplink information to the SDK when the application is opened through schemes by calling the handleURLSchemeDeeplink method at the beginning of the following function.

    3. Send deeplink information to the SDK when the application is opened through an universal link by calling the handleUserActivitymethod at the beginning of the following function.


      Links are forwarded to SceneDelegate, not AppDelegate, for projects using SceneDelegate. Please refer to the next section on how to receive deep links through SceneDelegate.

    For projects using SceneDelegate

    Deep links are forwarded to the following methods for projects that use SceneDelegate and support iOS 13+.

    • When the application was loaded from a "Not running" status.

      • scene(_:willConnectTo:options:)

    • All other situations (e.g. background)

      • Universal link: scene(_:continue:)

      • Scheme link: scene(_:openURLContexts:)

    For Projects using neither AppDelegate nor SceneDelegate (SwiftUI)

    If you are using SwiftUI without SceneDelegate, deep links would be forwarded through onOpenURL. This method would be added to your App class under @main.


    If SceneDelegate is being used in your SwiftUI environment, onOpenUrl cannot be used. Please refer to the For projects using SceneDelegate section.

    If you are using AppDelegate

    1. Open ios/[Project file]/AppDelegate.

    2. Use the setDeeplinkCallbackmethod to setup the callback that will be called when the application is opened through a deep link.

    If you are not using AppDelegate (SwiftUI)

    Please add the following method to the App class under @main.

    All deep links that open apps are sent to DeeplinkCallback Of those deep links, "Airbridge deep links" will be sent using the "iOS URI Scheme" (YOUR_SCHEME://...) that was set in the Airbridge dashboard.A deferred deep link will be sent to DeeplinkCallback if ATT status is approved or a timeout occurs.
    A deferred deep link will contain a deferred=true query parameter.

    For Airbridge iOS SDK 1.10.0 ~ 1.10.9, the "Airbridge deep link" will be sent as Airbridge iOS SDK ~1.9.10, the "Airbridge deep link" will be sent as either or YOUR_SCHEME://....

    Custom Domain Setting (Optional)

    If you are using a custom domain as an Airbridge tracking link, follow the below steps. (Replace with custom domain)

    • Go to "Xcode → Project file → Signing & Capabilities → Associated Domains".

    • Click "+" button and add

    • Open info.plist.

    • Add the following value.

    Check if the application is run and the deep link event is sent when "Airbridge deep links" are clicked on. Make sure that the deep link follows the "iOS URI Scheme" format configured in your Airbridge dashboard. (e.g. example://)

    1. Click deep link

    2. See if the deep link event appears at "Airbridge dashboard → Raw Data → App Real-time Logs"

    User Setup

    User Identifier Setup

    Once a user identifier information is sent to the SDK, all events thereafter will contain the corresponding user identifier information.





    User ID



    User Email

    Hashed by default
    (SHA256, can be disabled)


    User phone number

    Hashed by default
    (SHA256, can be disabled)


    User alias

    - Maximum 10 aliases
    - keytype is NSString, maximum 128 characters
    - keymust satisfy ^[a-zA-Z_][a-z0-9_]*$regex
    valuetype is NSString, maximum 128 characters

    User Attributes Setup

    Additional user attributes can be used for a more accurate MTA (Multi-Touch Attribution) analysis, additional internal data analysis, and linking third-party solutions.





    User attributes

    - Maximum 100 attributes
    - keytype is NSString, maximum 128 characters
    keymust satisfy ^[a-zA-Z_][a-z0-9_]*$regex
    valuetype is NSString or NSNumber
    - Maximum 1024 characters for NSString type

    Test User Information Setup

    Make sure that your user information settings are being properly sent through the SDK.

    1. Configure user identifier information.

    2. Send an event using the SDK.

    3. Click the event at "Airbridge dashboard → Raw Data → App Real-time Logs"

    4. Check if the user information is correctly sent under the userblock.

    Device Setup

    Setup Device Alias

    Setup a device alias through the Airbridge SDK. The alias will be sustained even after the app closes, unless otherwise deleted.



    setDeviceAlias(withKey: String, value: String)

    Add the key value pair to the device identifier.

    removeDeviceAlias(withKey: String)

    Delete the corresponding device alias.


    Delete all device aliases.

    Event Setup

    When important user actions occur, in-app events can be sent to measure the performance of each channel.

    All event parameters are optional. However, more information about the event will help provide a more accurate analysis.

    Sending Events

    Send events with the SDK.




    Event name (required)


    Event attribute 1


    Event attribute 2


    Event attribute value


    Additional custom attributes


    Additional semantic attributes (Map)

    Standard Events

    Send standard user events with the SDK.

    setActionsetLabelsetValuesetCustomssetSemanticssetSemanticAttributes can also be used when sending standard events.

    User Sign Up

    User Sign In

    User Sign Out

    View Home Screen

    View Product Detail

    View Product List

    View Search Result

    Add to Cart

    Order Complete

    Test Event Transmission

    Make sure that the events are being properly sent through the SDK.

    1. Send an event with the SDK.

    2. Check if the event shows up at "Airbridge dashboard → Raw Data → App Real-time Logs".

    Advanced Setup

    SDK Signature Setup

    Protection against SDK spoofing is possible once you set up an SDK signature. Settings can be applied by calling setSDKSignatureSecret before the SDK initialization code.

    Please ask your CSM for the "SDK Signature Secret ID" and "SDK Signature Secret" values.

    Hash User Information

    email and phone information are hashed by default. (SHA256)
    Call setIsUserInfoHashed at the beginning of the code that initializes the SDK to change this setting.

    Session Timeout

    Call setSessionTimeout at the beginning of the code that initializes the SDK to change this setting.

    • Session timeout is in milliseconds and must range between 0 and 604800000 (7 days).

    • Default value is 1000 * 60 * 5 (5 minutes).

    Privacy Protection

    Use this function if privacy laws apply, and data should only be collected and transferred with consent. (e.g GDPRCCPA)

    If autoStartTrackingEnabled is set to NO (false) before the SDK initialization code, events will not be sent before the startTracking function is called. This includes events such as "deep link open".

    The SDK will send all deep link events when the app is opened using a deep link.

    If setIsTrackAirbridgeDeeplinkOnly is set as YES (true) at the beginning of the code that initializes the SDK, the SDK will only send deep link events that use "Airbridge deep links".

    The Airbridge SDK can track Facebook deferred App Links through the following settings.

    1. Install the Facebook SDK:

    2. Open ios/[Project name]/AppDelegate.

    3. Set setIsFacebookDeferredAppLinkEnabledto YES(true) at the beginning of the code that initializes the Airbridge SDK.

    Track Uninstall Event

    Please refer to this page for more information on app uninstallation tracking.

    Use handleURLSchemeDeeplink to send the deep link event to the SDK when users click a push notification.

    Track Authorize Timeout

    When the AppTrackingTransparency.framework is used to present an app-tracking authorization request to the user, IDFA will not be collected when the install event occurs because the install event occurs before the selection.

    If trackingAuthorizeTimeoutis called before the SDK initialization code, the install event will be sent after the timeoutperiod or delayed until an ATT option is selected.

    trackingAuthorizeTimeoutis in milliseconds.

    Install events can be delayed for as long as the trackingAuthorizeTimeoutperiod.

    By default, trackingAuthorizeTimeoutis reset every time the App restarts. To prevent this, you can set isRestartTrackingAuthorizeTimeoutas NO or false.

    A deferred deep link will be sent to DeeplinkCallback if ATT status is aprroved or a timeout occurs.

    Event Buffer Limit

    When an event transmission failure occurs, the Airbridge SDK will store the event and retry at a later time. The following settings will allow you to limit the storage used for such events.

    Attribution Result Callback Setup

    Get attribution result data using the Airbridge SDK.

    • Below is a list of data fields that will be retrieved through the callback.




    Channel (String)


    Campaign (String)


    Ad Group (String)


    Ad Creative (String)


    Content (String)


    Keyword (String)


    Sub Publisher (String)


    Sub-sub Publisher 1 (String)


    Sub-sub Publisher 2 (String)


    Sub-sub Publisher 3 (String)

    • If the event is unattributed, below is an example of the response you'll get.

    Guidelines for using attribution result data

    • Attribution data exists

    1. Attribution data is forwarded within 40 seconds of SDK initialization.

    2. If the app was closed and attribution data wasn't received, attribution data is forwarded within 40 seconds when the app is opened again.

    3. On very rare occasions, attribution data could take up to 5 minutes to be received.

    • Attribution data does not exist

    1. Attribution data will be received 3 hours after SDK initialization.

    It is not recommended to utilize these attribution values for real-time processing

    Track Life-Cycle Event Within Session

    Airbridge doesn't track life-cycle event that occur within session timeout as default. You can track these events with below option.

    Hybrid Application

    While basic events (e.g. "install", "open", "deep link open") can be automatically tracked by only installing the iOS SDK in your hybrid app, in-app events (e.g. sign-up, purchase, etc.) cannot be tracked as they are actually in-browser events that occur within a website of the WebView environment. Airbridge provides a simpler way to track in-app events by enabling the iOS SDK to automatically pull all events from the web SDK that is installed on the website of the WebView environment. This replaces the hassle of having to create bridge functions between native and WebView environments.


    Please note that in order to utilize this feature, both SDKs must be installed; Android SDK on the mobile native environment and web SDK on the website of the WebView environment.

    Send WebView Environment Events

    The Airbridge iOS SDK can send events instead of the Airbridge Web SDK installed on your WebView website.

    Add Airbridge.webInterface under the WebView configuration controller.

    YOUR_WEB_TOKEN can be found at the "Airbridge dashboard → Settings → Tokens → Web SDK Token".



    If the app is using Autofill and no webcredentials are set, the application's autofill passwords are saved to or

    Follow the steps below to change the location of where the passwords will be saved to. Change to the domain you will be saving autofill passwords to.

    1. Host the following JSON at

    TEAM_ID.APP_BUNDLE_ID example:

    2. Go to "Xcode → Project file → Signing & Capabilities → Associated Domains".

    3. Click "+" and add

    Bitcode Compile Error

    Airbridge iOS SDK v1.28.0+ no longer supports Bitcode. (Bitcode has been deprecated since Xcode 14)
    This could lead to compile errors for the project if Bitcode is used.

    Please add the following to your Podfile to prevent this.

    Or you can set "ENABLE_BITCODE" to "NO" in Xcode.

    Please note that .ipa files using Bitcode are automatically deleted by the Appstore due to the Bitcode deprecation.

    Issues with Building Using Xcode 13

    Airbridge iOS SDK v1.28.0+ does not support Xcode 13, along with iOS 9 and iOS 10.
    If the above Xcode/iOS needs to be supported, please use iOS SDK v1.27.0 and below.

    Was this page helpful?

    Have any questions or suggestions?