Note
This guide provides instructions for installing and setting up the iOS SDK v4. For earlier versions, consult the iOS SDK (Previous) guide.
Install the Airbridge iOS SDK and implement the necessary settings following the steps below.
The Airbridge iOS SDK can be installed using the method below. After installation, you can verify whether the SDK has been properly installed through the iOS SDK Test.
1. Navigate to [File]>[Add Packages...] in Xcode.
2. Enter the following address into the search bar and click Add Package.
3. Click Add Package again.
4. The Airbridge iOS SDK will be added to Package Dependencies.
Attention
Before installing the iOS SDK, navigate to [YOUR_PROJECT]>[Build Settings] in your Xcode and make sure to set the User Script Sandboxing to "No." For more details, refer to the CocoaPods document.
1. Install CocoaPods with brew install cocoapods
.
2. Create a Podfile with pod init
.
3. Add the SDK as a dependency with the code below in the Podfile.
target '[Project Name]' do
...
# choose YOUR_VERSION from https://help.airbridge.io/developers/release-note-ios-sdk
# example: pod 'airbridge-ios-sdk', '4.X.X'
pod 'airbridge-ios-sdk', 'YOUR_VERSION'
...
end
4. The installation will start when you enter pod install --repo-update
.
5. Run YOUR_PROJECT.xcworkspace
to verify that the Airbridge iOS SDK is successfully installed.
Attention
You cannot install the Airbridge iOS SDK with Tuist's External Dependencies. Make sure to install the iOS SDK using the method below.
1. Run the tuist edit
command.
2. Add remote
to project.packages
. Add package
to project.targets[...].target.dependencies
. Refer to the code below.
import ProjectDescription
let project = Project(
packages: [
.remote(
url: "https://github.com/ab180/airbridge-ios-sdk-deployment",
// choose YOUR_VERSION from https://help.airbridge.io/developers/release-note-ios-sdk
// example: requirement: .exact(from: "4.X.X")
requirement: .exact(from: "YOUR_VERSION")
),
...
],
targets: [
.target(
dependencies: [
.package(product: "Airbridge", type: .runtime),
...
]
),
...
],
...
)
3. Run the tuist generate
command.
4. Airbridge is added to the Package Dependencies in Xcode.
1. Download the Airbridge iOS SDK from the link below.
2. Add Airbridge.xcframework to your project. Navigate to [Project File]>[General]>[Frameworks, Libraries, and Embedded Content] in Xcode and click +.
3. Click Add Files... under [Add Other...] and select Airbridge.xcframework.
4. Set the Embed of Airbridge.xcframework to "Do not Embed."
5. Add the framework corresponding to the dependency of SDK to the project. Navigate to [Project File]>[General]>[Frameworks, Libraries, and Embedded Content] in Xcode and click +.
6. Add all the frameworks below. Set the Embed of the added frameworks to "Do not Embed." Then, navigate to [Project File]>[Build Phase]>[Link Binary With Libraries] in the Xcode and set the Status to "Optional."
Framework | Description |
---|---|
AdSupport.framework | The framework used to collect IDFA. |
CoreTelephony.framework | The framework used to collect carrier information. |
StoreKit.framework | The framework used to collect SKAdNetwork information. |
AppTrackingTransparency.framework | The framework used to collect app tracking permission status information. |
AdServices.framework | The framework used to collect Apple Ads' attribution information for iOS 14.3 and later. |
Attention
Install only one version of the SDK, either the general SDK or the restricted SDK.
Depending on policies and environments, restrictions on collecting device IDs like GAID and IDFA may be required. When installing the Restricted SDK version, the device IDs are not collected.
Install the Restricted SDK using the method below.
1. Navigate to [File]>[Add Packages...] in Xcode.
2. Enter the following address into the search bar and click Add Package.
3. Click Add Package again.
4. The Airbridge iOS SDK will be added to Package Dependencies.
Attention
Before installing the iOS SDK, navigate to [YOUR_PROJECT]>[Build Settings] in your Xcode and make sure to set the User Script Sandboxing to "No." For more details, refer to the CocoaPods document.
1. Install CocoaPods with brew install cocoapods
.
2. Create a Podfile with pod init
.
3. Add the SDK as a dependency with the code below in the Podfile.
target '[Project Name]' do
...
# choose YOUR_VERSION from https://help.airbridge.io/developers/release-note-ios-sdk
# example: pod 'airbridge-ios-sdk-restricted', '4.X.X'
pod 'airbridge-ios-sdk-restricted', 'YOUR_VERSION'
...
end
4. The installation will start when you enter pod install --repo-update
.
5. Run YOUR_PROJECT.xcworkspace
to verify that the Airbridge iOS SDK is successfully installed.
Attention
You cannot install the Airbridge iOS SDK with Tuist's External Dependencies. Make sure to install the iOS SDK using the method below.
1. Run the tuist edit
command.
2. Add remote to project.packages
. Add the package
to project.targets [...].target.dependencies
. Refer to the code below.
import ProjectDescription
let project = Project(
packages: [
.remote(
url: "https://github.com/ab180/airbridge-ios-sdk-restricted-deployment",
// choose YOUR_VERSION from https://help.airbridge.io/developers/release-note-ios-sdk
// example: requirement: .exact(from: "4.X.X")
requirement: .exact(from: "YOUR_VERSION")
),
...
],
targets: [
.target(
dependencies: [
.package(product: "Airbridge", type: .runtime),
...
]
),
...
],
...
)
3. Run the tuist generate
command.
4. Airbridge is added to the Package Dependencies in Xcode.
1. Download the Airbridge iOS SDK from the link below.
2. Add Airbridge.xcframework to your project. Navigate to [Project File]>[General]>[Frameworks, Libraries, and Embedded Content] in Xcode and click +.
3. Click Add Files... under [Add Other...] and select Airbridge.xcframework.
4. Set the Embed of Airbridge.xcframework to "Do not Embed."
5. Add the framework corresponding to the dependency of SDK to the project. Navigate to [Project File]>[General]>[Frameworks, Libraries, and Embedded Content] in Xcode and click +.
6. Add all the frameworks below. Set the Embed of the added frameworks to "Do not Embed." Then, navigate to [Project File]>[Build Phase]>[Link Binary With Libraries] in the Xcode and set the Status to "Optional."
Framework | Description |
---|---|
CoreTelephony.framework | The framework used to collect carrier information. |
StoreKit.framework | The framework used to collect SKAdNetwork information. |
AdServices.framework | The framework used to collect Apple Ads' attribution information for iOS 14.3 and later. |
SDK initialization methods vary depending on the system architecture. For SceneDelegate Lifecycle or AppDelegate Lifecycle, refer to the method for AppDelegate. For SwiftUI Lifecycle, refer to the method for SwiftUI.
The YOUR_APP_NAME and YOUR_APP_SDK_TOKEN can be found on the [Settings]>[Tokens] page in the Airbridge dashboard.
Call the Airbridge.initializeSDK
function at the very top of AppDelegate's application(_:didFinishLaunchingWithOptions:)
function.
import UIKit
import Airbridge
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(option: option)
return true
}
}
Call the Airbridge.initializeSDK
function at the very top of AppDelegate's application(_:didFinishLaunchingWithOptions:)
function.
#import "AppDelegate.h"
#import <Airbridge/Airbridge.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
return YES;
}
@end
Call the Airbridge.initializeSDK
function at the top of init
.
import SwiftUI
import Airbridge
@main
struct ExampleApp: App {
init() {
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(option: option)
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
Attention
The SwiftUI Lifecycle method does not provide a Referrer URL, so the Organic Referrer Attribution cannot be used. Even with the use of UIApplicationDelegateAdaptor, the Organic Referrer Attribution cannot be used in the SwiftUI Lifecycle method.
Note
The functions necessary to ensure compliance with privacy policies should be reviewed with legal counsel.
In the iOS environment, the IDFA can only be collected when users provide consent for data tracking through the AppTrackingTransparency (ATT) prompt.
Event collection should be delayed until the user allows tracking. If the install event is collected before the user allows tracking through the ATT prompt, the install event data will lack an identifier, making performance measurement difficult. We recommend setting a sufficient delay time for event collection to collect identifiers.
1. Prepare the text you will use in the ATT prompt.
2. Enter the prepared text in the NSUserTrackingUsageDescription
key of the Info.plist
file.
Navigate to [YOUR_PROJECT]>[Info]>[Custom iOS Target Properties] in Xcode.
Hover your mouse over the key items, click + that appears, and enter Privacy - Tracking Usage Description
.
Enter the text for the ATT prompt as value.
1. Run the tuist edit
command.
2. Enter NSUserTrackingUsageDescription
as key to .extendingDefault
in project.targets[...].infoPlist
.
3. Enter the text for the ATT prompt as value.
import ProjectDescription
let project = Project(
targets: [
.target(
infoPlist: .extendingDefault(
with: [
"NSUserTrackingUsageDescription": "YOUR_DESCRIPTION",
...
]
),
...
),
...
]
...
)
3. Set the time for displaying the ATT prompt.
The ATTrackingManager.requestTrackingAuthorization
function should be called at the desired time you want to display the ATT prompt.
import AppTrackingTransparency
...
ATTrackingManager.requestTrackingAuthorization { _ in }
#import <AppTrackingTransparency/AppTrackingTransparency.h>
...
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {}];
Attention
The
ATTrackingManager.requestTrackingAuthorization
function does not provide the ATT prompt if the app that called it is not in an active state.
The ATT prompt can be displayed as soon as the app is launched.
import Airbridge
import AppTrackingTransparency
...
var observer: Any?
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(option: option)
...
observer = NotificationCenter.default.addObserver(
forName: UIApplication.didBecomeActiveNotification,
object: nil,
queue: nil
) { [weak self] _ in
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization { _ in }
}
if let observer = self?.observer {
NotificationCenter.default.removeObserver(observer)
}
}
#import <Airbridge/Airbridge.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
...
id observer;
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAutoDetermineTrackingAuthorizationEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
...
__weak typeof(self) weakSelf = self;
observer = [NSNotificationCenter.defaultCenter addObserverForName:UIApplicationDidBecomeActiveNotification
object:nil
queue:nil
usingBlock:^(NSNotification * _Nonnull notification) {
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {}];
}
if (weakSelf != nil && weakSelf->observer != nil) {
[NSNotificationCenter.defaultCenter removeObserver:observer];
}
}];
import SwiftUI
import Airbridge
import AppTrackingTransparency
@main
struct ExampleApp: App {
var observer: Any?
init() {
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(option: option)
observer = NotificationCenter.default.addObserver(
forName: UIApplication.didBecomeActiveNotification,
object: nil,
queue: nil
) { [weak self] _ in
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization { _ in }
}
if let observer = self?.observer {
NotificationCenter.default.removeObserver(observer)
}
}
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
4. If the install event is not collected, the Airbridge iOS SDK delays collecting install events for 30 seconds until the user allows tracking each time the app is launched. If the user exits the app before deciding whether to allow tracking, the SDK will not collect the install event and will try again at the next app launch.
The autoDetermineTrackingAuthorizationTimeout
function can be used to set a longer delay for collecting install events. The default setting for the autoDetermineTrackingAuthorizationTimeout
is 300 seconds. It can be set up to 3600 seconds (1 hour).
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME",
token: "YOUR_APP_SDK_TOKEN")
.setAutoDetermineTrackingAuthorizationTimeout(second: 300)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAutoDetermineTrackingAuthorizationTimeoutWithSecond:300];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
Attention
Sufficient time must be configured to delay the collection of install events. If the delay time is up, the SDK will collect install events without identifiers before users can allow tracking on the ATT prompt.
Attention
The instructions below are optional. Proceed only if necessary.
The opt-in policy requires user consent before using user data.
After setting the setAutoStartTrackingEnabled
function to false
, call the startTracking
function at the point of time when you can collect events. When the startTracking
function is called, the SDK will start collecting events.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setAutoStartTrackingEnabled(false)
.build()
Airbridge.initializeSDK(option: option)
...
Airbridge.startTracking()
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAutoStartTrackingEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
...
[Airbridge startTracking];
Attention
The instructions below are optional. Proceed only if necessary.
The opt-out policy allows the use of user information until the user explicitly declines.
After setting the setAutoStartTrackingEnabled
function to true
, call the stopTracking
function at the point of time when you can no longer collect events. When the stopTracking
function is called, the SDK will stop collecting events.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setAutoStartTrackingEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
...
Airbridge.stopTracking()
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAutoStartTrackingEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
...
[Airbridge stopTracking];
Attention
The instructions below are optional. Proceed only if necessary.
With the SDK Signature, you can ensure SDK spoofing prevention and use verified events for ad performance measurement.
For the SDK Signature setup, the SDK Signature Credentials are required, which includes the Secret ID and the Secret. The required SDK Signature Credentials can be found in the Airbridge dashboard. For more details about the SDK Signature Credentials, refer to this Airbridge guide.
You can set the SDK Signature by calling the setSDKSignature
function above the SDK initialization code.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setSDKSignature(
id: "YOUR_SDK_SIGNATURE_SECRET_ID",
secret: "YOUR_SDK_SIGNATURE_SECRET"
)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setSDKSignatureWithId:@"YOUR_SDK_SIGNATURE_SECRET_ID"
secret:@"YOUR_SDK_SIGNATURE_SECRET"];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
The information required for the setup is as follows.
YOUR_APP_NAME: This is the Airbridge app name, which can be found at [Settings]>[Tokens] in the Airbridge Dashboard.
YOUR_APP_SDK_TOKEN: This is the Android SDK token, which can be found at [Settings]>[Tokens] in the Airbridge Dashboard.
YOUR_SDK_SIGNATURE_SECRET_ID: This is the Secret ID, which can be found at [Management]>[Fraud Validation Rules]>[SDK Signature] in the Airbridge Dashboard.
YOUR_SDK_SIGNATURE_SECRET: This is the Secret, which can be found at [Management]>[Fraud Validation Rules]>[SDK Signature] in the Airbridge Dashboard.
Deep linking allows you to redirect users from ads to specific locations within your app. The data collected from the tracking link enables you to monitor the performance of the deep link in Airbridge.
When Airbridge generates a tracking link, it automatically selects and utilizes the optimal Airbridge deep link, depending on the environment. This link will be used for user redirection, and it is called the scheme deep link.
Example)
Airbridge Deep link: https://YOUR_APP_NAME.airbridge.io/~~~
Scheme Deep link: YOUR_SCHEME://product/12345
When the app is installed on a device and the user clicks the tracking link, the app opens through the Airbridge deep link. The Airbridge SDK converts the Airbridge deep link into a scheme deep link set on the tracking link. The converted scheme deep link is sent to the app.
When the app is not installed on a device and the user clicks the tracking link, the Airbridge deep link is saved. After the user moves to the app store or website and the app is installed and launched, the Airbridge SDK converts the saved Airbridge deep link into a scheme deep link. The converted scheme deep link is sent to the app.
For the deep linking setup, the following information is required.
Deep link information submitted in the Airbridge dashboard
App page address for user redirection
First, enter the deep link information into the Airbridge dashboard.
For the deep linking setup, the following information must be entered into the Airbridge dashboard.
iOS URI scheme: The Airbridge deep link is converted to a scheme deep link using the iOS URI scheme.
iOS App ID: The universal link domain of the Airbridge deep link is set using the iOS App ID.
Attention
To ensure proper user redirection, the iOS URI scheme and iOS App ID must be registered differently for the production app and the development app.
Follow the steps below to enter the above information into the Airbridge dashboard.
1. Go to [Tracking Link]>[Deep Links] in the Airbridge dashboard.
2. Enter the iOS URI scheme in the iOS URI Scheme field. Include ://
. For example, if the iOS URI scheme is demo
, you enter it as demo://
.
3. In the Apple Developer Dashboard, go to [Identifier] of the app you want to set up the deep link. Find the App ID Prefix and Bundle ID.
4. The iOS App ID is in the format of App ID Prefix+ .+ Bundle ID
. Enter the iOS App ID into the iOS App ID field. For example, if the App ID Prefix is prefix
and the Bundle ID is example
, the iOS App ID is prefix.example
.
After entering the deep link information into the Airbridge dashboard, an additional app setup is required. Check the required setup process below, which varies by the app's system method.
The app setup is required to enable the following.
App launch with Airbridge deep links
Airbridge deep link event collection
User redirection with Airbridge deep links
The app should be launched with the Airbridge deep link when the user clicks the tracking link.
1. Navigate to [YOUR_PROJECT]>[Info]>[URL Types] in Xcode.
2. Click + and enter the iOS URI scheme that has been entered into the Airbridge dashboard into the URL Schemes field.
Attention
Enter the iOS URL scheme without
://
.
3. Navigate to [YOUR_PROJECT]>[Signing & Capabilities] in Xcode.
4. Click + Capabilities to add Associated Domains.
5. Add applinks:YOUR_APP_NAME.airbridge.io
and applinks:YOUR_APP_NAME.abr.ge
to Associated Domains. YOUR_APP_NAME is the Airbridge App Name.
Attention
If you are using or plan to use the Password AutoFill feature, you must add the Webcredentials domain. A situation may arise where the domain of the password saved through the Password AutoFill feature appears as airbridge.io or abr.ge to users of the app.
For more information, refer to this troubleshooting guide.
Attention
Deep link events cannot be automatically collected on iOS. You must pass the deep link event to the Airbridge SDK using the
Airbridge.trackDeeplink
function.
The deep link events should be passed to the Airbridge SDK for collection. Call the Airbridge.trackDeeplink
function at the top of the OS callback when the app is launched with a deep link.
import Airbridge
...
Airbridge.trackDeeplink(url: url)
Airbridge.trackDeeplink(userActivity: userActivity)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackDeeplinkWithUrl:url];
[Airbridge trackDeeplinkWithUserActivity:userActivity];
Detailed settings differ depending on the status of the app.
1. Call the Airbridge.trackDeeplink
function in the function that is called when the terminated app is newly launched with a scheme deep link or universal link.
import Airbridge
...
// when terminated app is opened with scheme deeplink or universal links
func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
// when app is opened with scheme deeplink
if let url = connectionOptions.urlContexts.first?.url {
// track deeplink
Airbridge.trackDeeplink(url: url)
}
// when app is opened with universal links
else if let userActivity = connectionOptions.userActivities.first {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
}
}
#import <Airbridge/Airbridge.h>
...
// when terminated app is opened with scheme deeplink or universal links
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
// when app is opened with scheme deeplink
NSURL* url = connectionOptions.URLContexts.allObjects.firstObject.URL;
NSUserActivity* userActivity = connectionOptions.userActivities.allObjects.firstObject;
if (url != nil) {
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
}
else if (userActivity != nil) {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
}
}
2. Call the Airbridge.trackDeeplink
function in the function that is called when the backgrounded app is launched with a scheme deep link.
import Airbridge
...
// when backgrounded app is opened with scheme deeplink
func scene(
_ scene: UIScene,
openURLContexts URLContexts: Set<UIOpenURLContext>
) {
guard let url = URLContexts.first?.url else { return }
// track deeplink
Airbridge.trackDeeplink(url: url)
}
#import <Airbridge/Airbridge.h>
...
// when backgrounded app is opened with scheme deeplink
- (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
NSURL* url = URLContexts.allObjects.firstObject.URL;
if (url == nil) { return; }
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
}
3. Call the Airbridge.trackDeeplink
function in the function that is called when the backgrounded app is launched with a universal link.
import Airbridge
...
// when backgrounded app is opened with universal links
func scene(
_ scene: UIScene,
continue userActivity: NSUserActivity
) {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
}
// when backgrounded app is opened with universal links
- (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
}
To redirect users to the intended destination, the Airbridge deep link must be converted into a scheme deep link using the Airbridge.handleDeeplink
function.
import Airbridge
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
#import <Airbridge/Airbridge.h>
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
The Airbridge.handleDeeplink
function returns true
and the scheme deep link as a callback if an Airbridge deep link is input. If anything other than an Airbridge deep link is input, it returns false
and doesn’t provide a callback. Using this function, the Airbridge deep links can be handled separately from other deep links.
Depending on the system method and app status, call the Airbridge.handleDeeplink
function under the OS callback Airbridge.trackDeeplink
function, which is called by the app when launched with a deep link. If necessary, the existing logic should be processed together.
1. Implement a function to process apps launched by Airbridge deep links in SceneDelegate.
import Foundation
...
// when app is opened with airbridge deeplink
func handleAirbridgeDeeplink(url: URL) {
// show proper content using url (YOUR_SCHEME://...)
}
import Foundation
...
// when app is opened with airbridge deeplink
- (void)handleAirbridgeDeeplink:(NSURL *)url {
// show proper content using url (YOUR_SCHEME://...)
}
2. Call the Airbridge.trackDeeplink
function in the function that is called when the terminated app is newly launched with a scheme deep link or universal link. Send users to the intended destination using the converted scheme deep link.
import Airbridge
...
// when terminated app is opened with scheme deeplink or universal links
func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
// when app is opened with scheme deeplink
if let url = connectionOptions.urlContexts.first?.url {
// track deeplink
Airbridge.trackDeeplink(url: url)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
// when app is opened with universal links
else if let userActivity = connectionOptions.userActivities.first {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
}
#import <Airbridge/Airbridge.h>
...
// when terminated app is opened with scheme deeplink or universal links
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
// when app is opened with scheme deeplink
NSURL* url = connectionOptions.URLContexts.allObjects.firstObject.URL;
NSUserActivity* userActivity = connectionOptions.userActivities.allObjects.firstObject;
if (url != nil) {
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
}
else if (userActivity != nil) {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
}
}
3. Call the Airbridge.trackDeeplink
function in the function that is called when the backgrounded app is launched with a scheme deep link. Send users to the intended destination using the converted scheme deep link.
import Airbridge
...
// when backgrounded app is opened with scheme deeplink
func scene(
_ scene: UIScene,
openURLContexts URLContexts: Set<UIOpenURLContext>
) {
guard let url = URLContexts.first?.url else { return }
// track deeplink
Airbridge.trackDeeplink(url: url)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
#import <Airbridge/Airbridge.h>
...
// when backgrounded app is opened with scheme deeplink
- (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
NSURL* url = URLContexts.allObjects.firstObject.URL;
if (url == nil) { return; }
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
}
4. Call the Airbridge.trackDeeplink
function in the function that is called when the backgrounded app is launched with a universal link. Send users to the intended destination using the converted scheme deep link.
import Airbridge
...
// when backgrounded app is opened with universal links
func scene(
_ scene: UIScene,
continue userActivity: NSUserActivity
) {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
// when backgrounded app is opened with universal links
- (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
}
The app setup is required to enable the following.
App launch with Airbridge deep links
Airbridge deep link event collection
User redirection with Airbridge deep links
The app should be launched with the Airbridge deep link when the user clicks the tracking link.
1. Navigate to [YOUR_PROJECT]>[Info]>[URL Types] in Xcode.
2. Click + and enter the iOS URI scheme that has been entered into the Airbridge dashboard into the URL Schemes field.
Attention
Enter the iOS URL scheme without
://
.
3. Navigate to [YOUR_PROJECT]>[Signing & Capabilities] in Xcode.
4. Click + Capabilities to add Associated Domains.
5. Add applinks:YOUR_APP_NAME.airbridge.io
and applinks:YOUR_APP_NAME.abr.ge
to Associated Domains. YOUR_APP_NAME is the Airbridge app name.
Attention
If you are using or plan to use the Password AutoFill feature, you must add the Webcredentials domain. A situation may arise where the domain of the password saved through the Password AutoFill feature appears as airbridge.io or abr.ge to users of the app.
For more information, refer to this troubleshooting guide.
Attention
Deep link events cannot be automatically collected on iOS. You must pass the deep link event to the Airbridge SDK using the
Airbridge.trackDeeplink
function.
The deep link events should be passed to the Airbridge SDK for collection. Call the Airbridge.trackDeeplink
function at the top of the OS callback when the app is launched with a deep link.
import Airbridge
...
Airbridge.trackDeeplink(url: url)
Airbridge.trackDeeplink(userActivity: userActivity)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackDeeplinkWithUrl:url];
[Airbridge trackDeeplinkWithUserActivity:userActivity];
Call the Airbridge.trackDeeplink
function in the function that is called when the app is launched with a scheme deep link or a universal link. Use the Airbridge.trackDeeplink
function to deliver the deep link to the Airbridge SDK.
import SwiftUI
import Airbridge
@main
struct ActualApp: App {
var body: some Scene {
WindowGroup {
ContentView()
// when app is opened with scheme deeplink or universal links
.onOpenURL { url in
// track deeplink
Airbridge.trackDeeplink(url: url)
}
}
}
}
To redirect users to the intended destination, the Airbridge deep link must be converted into a scheme deep link using the Airbridge.handleDeeplink
function.
import Airbridge
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
#import <Airbridge/Airbridge.h>
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
The Airbridge.handleDeeplink
function returns true
and the scheme deep link as a callback if an Airbridge deep link is input. If anything other than an Airbridge deep link is input, it returns false
and doesn’t provide a callback. Using this function, the Airbridge deep links can be handled separately from other deep links.
Call the Airbridge.handleDeeplink
function under the OS callback Airbridge.trackDeeplink
function, which is called by the app when launched with a deep link. If necessary, the existing logic should be processed together.
Call the Airbridge.handleDeeplink
function in the function that is called when the app is launched with a scheme deep link or a universal link. Send users to the intended destination using the converted scheme deep link.
import SwiftUI
import Airbridge
@main
struct ActualApp: App {
var body: some Scene {
WindowGroup {
ContentView()
// when app is opened with scheme deeplink or universal links
.onOpenURL { url in
// track deeplink
Airbridge.trackDeeplink(url: url)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
}
}
}
The app setup is required to enable the following.
App launch with Airbridge deep links
Airbridge deep link event collection
User redirection with Airbridge deep links
The app should be launched with the Airbridge deep link when the user clicks the tracking link.
1. Navigate to [YOUR_PROJECT]>[Info]>[URL Types] in Xcode.
2. Click + and enter the iOS URI scheme that has been entered into the Airbridge dashboard into the URL Schemes field.
Attention
Enter the iOS URL scheme without
://
.
3. Navigate to [YOUR_PROJECT]>[Signing & Capabilities] in Xcode.
4. Click + Capabilities to add Associated Domains.
5. Add applinks:YOUR_APP_NAME.airbridge.io
and applinks:YOUR_APP_NAME.abr.ge
to Associated Domains. YOUR_APP_NAME is the Airbridge app name.
Attention
If you are using or plan to use the Password AutoFill feature, you must add the Webcredentials domain. A situation may arise where the domain of the password saved through the Password AutoFill feature appears as airbridge.io or abr.ge to users of the app.
For more information, refer to this troubleshooting guide.
Attention
Deep link events cannot be automatically collected on iOS. You must pass the deep link event to the Airbridge SDK using the
Airbridge.trackDeeplink
function.
The deep link events should be passed to the Airbridge SDK for collection. Call the Airbridge.trackDeeplink
function at the top of the OS callback when the app is launched with a deep link.
import Airbridge
...
Airbridge.trackDeeplink(url: url)
Airbridge.trackDeeplink(userActivity: userActivity)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackDeeplinkWithUrl:url];
[Airbridge trackDeeplinkWithUserActivity:userActivity];
The detailed setup method varies depending on the Airbridge deep link type.
1. When the app is launched with a scheme deep link, call the Airbridge.trackDeeplink
function in the function that is called when the app is lauched.
import Airbridge
...
// when app is opened with scheme deeplink
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]
) -> Bool {
// track deeplink
Airbridge.trackDeeplink(url: url)
return true
}
#import <Airbridge/Airbridge.h>
...
// when app is opened with scheme deeplink
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
return YES;
}
2. When the app is launched with a Universal Link, call the Airbridge.trackDeeplink
function in the function that is called when the app is lauched.
// when app is opened with universal links
func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
return true
}
#import <Airbridge/Airbridge.h>
...
// when app is opened with universal links
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
return YES;
}
To redirect users to the intended destination, the Airbridge deep link must be converted into a scheme deep link using the Airbridge.handleDeeplink
function.
import Airbridge
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
#import <Airbridge/Airbridge.h>
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
The Airbridge.handleDeeplink
function returns true
and the scheme deep link as a callback if an Airbridge deep link is input. If anything other than an Airbridge deep link is input, it returns false
and doesn’t provide a callback. Using this function, the Airbridge deep links can be handled separately from other deep links.
Call the Airbridge.handleDeeplink
function under the OS callback Airbridge.trackDeeplink
function, which is called by the app when launched with a deep link. If necessary, the existing logic should be processed together.
1. Implement a function to process apps launched by Airbridge deep links in AppDelegate.
import Foundation
...
// when app is opened with airbridge deeplink
func handleAirbridgeDeeplink(url: URL) {
// show proper content using url (YOUR_SCHEME://...)
}
import Foundation
...
// when app is opened with airbridge deeplink
- (void)handleAirbridgeDeeplink:(NSURL *)url {
// show proper content using url (YOUR_SCHEME://...)
}
2. Call the Airbridge.handleDeeplink
function from the function that is called when the app is launched with a scheme deep link. Send users to the intended destination using the converted scheme deep link.
import Airbridge
...
// when app is opened with scheme deeplink
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]
) -> Bool {
// track deeplink
Airbridge.trackDeeplink(url: url)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
return isHandled
}
#import <Airbridge/Airbridge.h>
...
// when app is opened with scheme deeplink
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
return isHandled;
}
3. Call the Airbridge.handleDeeplink
function from the function that is called when the app is launched with a universal link. Send users to the intended destination using the converted scheme deep link.
// when app is opened with universal links
func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
return isHandled
}
#import <Airbridge/Airbridge.h>
...
// when app is opened with universal links
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
return isHandled;
}
When a user clicks on a tracking link with deferred deep linking capabilities and your app is not installed on the device, the Airbridge SDK retrieves the deep link as follows.
The Airbridge SDK attempts to retrieve a deep link after initializing the SDK when all the following conditions are met. If the app is closed during retrieval, the Airbridge SDK treats it as if there is no stored Airbridge deep link.
The Airbridge.startTracking
function is called with the opt-in settings in place. Or, opt-in has not been set.
The ATT tracking response has been determined. Or, the event collection delay time set in the ATT prompt has expired.
Use the Airbridge.handleDeferredDeeplink
function to convert the stored Airbridge deep link into a scheme deep link after acquisition and deliver it to the app. The converted scheme deep link is used to send the user to the intended destination.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(option: option)
...
let isHandled = Airbridge.handleDeferredDeeplink() { url in
if let url {
// show proper content using url (YOUR_SCHEME://...)
}
}
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
...
BOOL isHandled = [Airbridge handleDeferredDeeplinkOnSuccess:^(NSURL* url) {
if (url != nil) {
// show proper content using url (YOUR_SCHEME://...)
}
}];
The Airbridge.handleDeferredDeeplink
function returns true
if the app is installed and called for the first time, waits for the Airbridge deep link acquisition, and converts it to a scheme deep link to pass it to onSuccess
. You can use this scheme deep link to send users to the set destination.
If there is no stored Airbridge deep link, nil
is passed to onSuccess
. If the SDK is not initialized or if the Airbridge.handleDeferredDeeplink
function has not been called for the first time, false
will be returned.
The scheme deep link delivered is generally in the format of YOUR_SCHEME://...
URL. If you use services like Meta Deferred App Links, it may be delivered in a different format.
The Airbridge SDK collects user actions from the app as per settings and sends them as in-app events.
SDK setup for hybrid app
You can set up the Android SDK to handle Airbridge-related tasks within the in-app website without changing the website's code for your hybrid app.
Call the Airbridge.trackEvent
function to send events. Refer to the information below about the required Airbridge.trackEvent
function components and their types.
Component | Required | Type | Description |
---|---|---|---|
category | Required | String | Event name |
semanticAttributes | Optional | [String: Any] | Semantic attributes of events |
customAttributes | Optional | [String: Any] | Custom attributes of events |
Refer to the component definition and available strings below.
The Standard Event Categories provided by the Airbridge SDK can be found in the AirbridgeCategory. You can also enter the Event Categories from the list of Standard Events.
You can send a custom event by entering the event name set in the event taxonomy.
Refer to the example below.
import Airbridge
...
// track standard event (provided by sdk)
Airbridge.trackEvent(category: AirbridgeCategory.ORDER_COMPLETED)
// track standard event (not provided by sdk)
Airbridge.trackEvent(category: "airbridge.ecommerce.order.canceled")
// track custom event
Airbridge.trackEvent(category: "eventViewed")
#import <Airbridge/Airbridge.h>
...
// track standard event (provided by sdk)
[Airbridge trackEventWithCategory:AirbridgeCategory.ORDER_COMPLETED];
// track standard event (not provided by sdk)
[Airbridge trackEventWithCategory:@"airbridge.ecommerce.order.canceled"];
// track custom event
[Airbridge trackEventWithCategory:@"eventViewed"];
Attention
The Airbridge SDK v4 attributes differ from the previous version. The previous version's attributes do not include action, label, and value.
Additional information about the event can be collected using attributes.
Action, Label: Collect information that can be used as GroupBys in the Airbridge reports
Value: Collect information that can be used for sales analysis. Airbridge can perform calculations using the collected data.
Semantic Attribute: Collect predefined attributes by Airbridge.
Custom Attributes: Collect attributes defined by Airbridge users.
You can enter Action, Label, Value, and Semantic Attributes using the semanticAttributes
parameter of the Airbridge.trackEvent
function and enter Custom Attributes using the customAttributes
parameter.
The semantic attributes predefined by Airbridge can be found in the user guide below.
Refer to the example below.
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ORDER_COMPLETED,
semanticAttributes: [
// action
AirbridgeAttribute.ACTION: "Tool",
// label
AirbridgeAttribute.LABEL: "Hammer",
// value
AirbridgeAttribute.VALUE: 10,
// semantic attribute (provided by sdk)
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PRODUCTS: [
[
// semantic attribute value (provided by sdk)
AirbridgeAttribute.PRODUCT_ID: "12345",
// semantic attribute value (not provided by sdk)
"name": "PlasticHammer",
],
],
// semantic attribute (not provided by sdk)
"totalQuantity": 1,
],
customAttributes: [
// custom attribute
"promotion": "FirstPurchasePromotion",
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:@"event" semanticAttributes:@{
// action
AirbridgeAttribute.ACTION: @"Tool",
// label
AirbridgeAttribute.LABEL: @"Hammer",
// value
AirbridgeAttribute.VALUE: @(10),
// semantic attribute (provided by sdk)
AirbridgeAttribute.CURRENCY: @"USD",
AirbridgeAttribute.PRODUCTS: @[
@{
// semantic attribute value (provided by sdk)
AirbridgeAttribute.PRODUCT_ID: @"12345",
// semantic attribute value (not provided by sdk)
@"name": @"PlasticHammer",
},
],
// semantic attribute (not provided by sdk)
@"totalQuantity": @(1),
}, customAttributes:@{
// custom attribute
@"promotion": @"FirstPurchasePromotion",
}];
Attention
Semantic attributes and custom attributes only allow JSON as a data type.
JSON types: String, Number, Boolean, Object<String, JSON>, Array<JSON>
Types that cannot be used in semantic attributes and custom attributes: Struct, Class, etc.
The Event Category of Standard Events and Semantic Attributes provided by the SDK are as follows.
Key | Type | Value |
---|---|---|
SIGN_UP | String | airbridge.user.signup |
SIGN_IN | String | airbridge.user.signin |
SIGN_OUT | String | airbridge.user.signout |
HOME_VIEWED | String | airbridge.ecommerce.home.viewed |
PRODUCT_LIST_VIEWED | String | airbridge.ecommerce.productList.viewed |
SEARCH_RESULTS_VIEWED | String | airbridge.ecommerce.searchResults.viewed |
PRODUCT_VIEWED | String | airbridge.ecommerce.product.viewed |
ADD_PAYMENT_INFO | String | airbridge.addPaymentInfo |
ADD_TO_WISHLIST | String | airbridge.addToWishlist |
ADDED_TO_CART | String | airbridge.ecommerce.product.addedToCart |
INITIATE_CHECKOUT | String | airbridge.initiateCheckout |
ORDER_COMPLETED | String | airbridge.ecommerce.order.completed |
ORDER_CANCELED | String | airbridge.ecommerce.order.canceled |
START_TRIAL | String | airbridge.startTrial |
SUBSCRIBE | String | airbridge.subscribe |
UNSUBSCRIBE | String | airbridge.unsubscribe |
AD_IMPRESSION | String | airbridge.adImpression |
AD_CLICK | String | airbridge.adClick |
COMPLETE_TUTORIAL | String | airbridge.completeTutorial |
ACHIEVE_LEVEL | String | airbridge.achieveLevel |
UNLOCK_ACHIEVEMENT | String | airbridge.unlockAchievement |
RATE | String | airbridge.rate |
SHARE | String | airbridge.share |
SCHEDULE | String | airbridge.schedule |
SPEND_CREDITS | String | airbridge.spendCredits |
Key | Type | Value |
---|---|---|
ACTION | String | action |
LABEL | String | label |
VALUE | String | value |
CURRENCY | String | currency |
ORIGINAL_CURRENCY | String | originalCurrency |
PRODUCTS | String | products |
PRODUCT_ID | String | productID |
PRODUCT_NAME | String | name |
PRODUCT_PRICE | String | price |
PRODUCT_QUANTITY | String | quantity |
PRODUCT_CURRENCY | String | currency |
PRODUCT_POSITION | String | position |
PRODUCT_CATEGORY_ID | String | categoryID |
PRODUCT_CATEGORY_NAME | String | categoryName |
PRODUCT_BRAND_ID | String | brandID |
PRODUCT_BRAND_NAME | String | brandName |
PERIOD | String | period |
IS_RENEWAL | String | isRenewal |
RENEWAL_COUNT | String | renewalCount |
PRODUCT_LIST_ID | String | productListID |
CART_ID | String | cartID |
TRANSACTION_ID | String | transactionID |
TRANSACTION_TYPE | String | transactionType |
TRANSACTION_PAIRED_EVENT_CATEGORY | String | transactionPairedEventCategory |
TRANSACTION_PAIRED_EVENT_TIMESTAMP | String | transactionPairedEventTimestamp |
TOTAL_QUANTITY | String | totalQuantity |
QUERY | String | query |
IN_APP_PURCHASED | String | inAppPurchased |
CONTRIBUTION_MARGIN | String | contributionMargin |
ORIGINAL_CONTRIBUTION_MARGIN | String | originalContributionMargin |
LIST_ID | String | listID |
RATE_ID | String | rateID |
RATE | String | rate |
MAX_RATE | String | maxRate |
ACHIEVEMENT_ID | String | achievementID |
SHARED_CHANNEL | String | sharedChannel |
DATE_TIME | String | datetime |
DESCRIPTION | String | description |
IS_REVENUE | String | isRevenue |
PLACE | String | place |
SCHEDULE_ID | String | scheduleID |
TYPE | String | type |
LEVEL | String | level |
SCORE | String | score |
AD_PARTNERS | String | adPartners |
IS_FIRST_PER_USER | String | isFirstPerUser |
Refer to the example codes for each data type below.
import Airbridge
...
Airbridge.trackEvent(
category: "event",
semanticAttributes: [
AirbridgeAttribute.VALUE: 10,
],
customAttributes: [
"string": "string",
"number": 1000,
"boolean": true,
"object": ["key": "value"],
"array": ["value"],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:@"event" semanticAttributes:@{
AirbridgeAttribute.VALUE: @(10),
} customAttributes:@{
@"string": "string",
@"number": @(1000),
@"boolean": @(YES),
@"object": @{@"key": @"value"},
@"array": @[@"value"],
@"key": @"value",
}];
Attention
The default settings will apply if no additional settings are configured. Proceed after reviewing whether additional settings are necessary.
Configure additional settings for sending in-app events if necessary.
The Airbridge SDK supports events triggered by users on a session basis. A session ends if any of the following conditions are met.
The app moves to the background, or the app is terminated
The session expires with the app being in the foreground
When the app is launched, or an event is performed after the end of a session, a new session is initiated.
The default session timeout is set to 300 seconds. Use the setSessionTimeout
function to modify this value to a maximum of 604,800 seconds (7 days).
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setSessionTimeout(second: 300)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setSessionTimeoutWithSecond:300];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
Attention
The Airbridge SDK collects Open events that initiate a new session and Foreground events. It does not collect these events during a session. To collect them while the session is being maintained, additional settings are required.
The Airbridge SDK maintains a queue of collected events and transmits them until the queue is empty.
If event transmission fails, transmission is attempted again after waiting for 1, 2, 4, ... seconds, depending on the number of times it failed. If the transmission continues to fail, the SDK waits for the set event transmission interval and repeats loading events until successful.
The default transmission interval is 0 seconds. Using the setEventTransmitInterval
function, you can modify it up to 86,400 seconds (1 day).
Refer to the example below.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setEventTransmitInterval(second: 0)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setEventTransmitIntervalWithSecond:0];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
The Airbridge SDK stores events as long as they don't exceed the maximum event count and size limits. Excess events are discarded.
The default maximum event count is set to INT_MAX, and the default maximum event size is 1024 GiB (gibibytes). You can adjust these settings using the setEventBufferCountLimit
function and the setEventBufferSizeLimit
function. The highest allowable event count is INT_MAX, and the highest maximum event size you can set is 1024 GiB (gibibytes).
Refer to the example below.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_TOKEN")
.setEventBufferCountLimit(Int.max)
.setEventBufferSizeLimit(gibibyte: 1024)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_TOKEN"];
[optionBuilder setEventBufferCountLimit:INT_MAX];
[optionBuilder setEventBufferSizeLimitWithGibibyte:1024];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
When the event deletion option is activated, all in-app events that are not transmitted during the initialization process of the Airbridge SDK are deleted. By default, the event deletion option is inactive.
By setting the setClearEventBufferOnInitializeEnabled
function to true
, the event deletion option is activated.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_TOKEN")
.setClearEventBufferOnInitializeEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_TOKEN"];
[optionBuilder setClearEventBufferOnInitializeEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
The Airbridge SDK supports functions to include device identifiers in all events for transmission.
#{"width": "140px"} Function | #{"width": "240px"} Description |
---|---|
| Adds additional device identifiers. Up to 10 can be entered. - Key: Maximum 128 characters. It must satisfy the regular expression - Value: Maximum 128 characters. |
| Deletes only specified device identifiers. |
| Deletes all device identifiers. |
Refer to the example below.
import Airbridge
...
Airbridge.setDeviceAlias(key: "string", value: "string")
Airbridge.removeDeviceAlias(key: "string")
Airbridge.clearDeviceAlias()
#import <Airbridge/Airbridge.h>
...
[Airbridge setDeviceAliasWithKey:@"string" value:@"string"];
[Airbridge removeDeviceAliasWithKey:@"string"];
[Airbridge clearDeviceAlias];
Airbridge collects in-app events that are classified as Standard Events and Custom Events. Standard Events are events predefined by Airbridge. Refer to the example codes below.
import Airbridge
...
Airbridge.setUserID("string")
Airbridge.setUserAlias(key: "string", value: "string")
Airbridge.setUserEmail("string")
Airbridge.setUserPhone("string")
Airbridge.setUserAttribute(key: "string", value: "string")
Airbridge.trackEvent(
category: AirbridgeCategory.SIGN_UP
)
#import <Airbridge/Airbridge.h>
...
[Airbridge setUserID:@"string"];
[Airbridge setUserAliasWithKey:@"string" value:@"string"];
[Airbridge setUserEmail:@"string"];
[Airbridge setUserPhone:@"string"];
[Airbridge setUserAttributeWithKey:@"string" value:@"string"];
[Airbridge trackEventWithCategory:AirbridgeCategory.SIGN_UP];
import Airbridge
...
Airbridge.setUserID("string")
Airbridge.setUserAlias(key: "string", value: "string")
Airbridge.setUserEmail("string")
Airbridge.setUserPhone("string")
Airbridge.setUserAttribute(key: "string", value: "string")
Airbridge.trackEvent(
category: AirbridgeCategory.SIGN_IN
)
#import <Airbridge/Airbridge.h>
...
[Airbridge setUserID:@"string"];
[Airbridge setUserAliasWithKey:@"string" value:@"string"];
[Airbridge setUserEmail:@"string"];
[Airbridge setUserPhone:@"string"];
[Airbridge setUserAttributeWithKey:@"string" value:@"string"];
[Airbridge trackEventWithCategory:AirbridgeCategory.SIGN_IN];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SIGN_OUT
)
Airbridge.clearUser()
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SIGN_OUT];
[Airbridge clearUser];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.HOME_VIEWED
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.HOME_VIEWED];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.PRODUCT_LIST_VIEWED,
semanticAttributes: [
AirbridgeAttribute.LIST_ID: "84e6e236-38c4-48db-9b49-16e4cc064386",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.PRODUCT_LIST_VIEWED semanticAttributes:@{
@AirbridgeAttribute.LIST_ID: @"84e6e236-38c4-48db-9b49-16e4cc064386",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SEARCH_RESULTS_VIEWED,
semanticAttributes: [
AirbridgeAttribute.QUERY: "Plastic",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SEARCH_RESULTS_VIEWED semanticAttributes:@{
@AirbridgeAttribute.QUERY: @"Plastic",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.PRODUCT_VIEWED,
semanticAttributes: [
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.PRODUCT_VIEWED semanticAttributes:@{
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ADD_PAYMENT_INFO,
semanticAttributes: [
AirbridgeAttribute.TYPE: "CreditCard",
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ADD_PAYMENT_INFO semanticAttributes:@{
@AirbridgeAttribute.TYPE: @"CreditCard",
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ADD_TO_WISHLIST,
semanticAttributes: [
AirbridgeAttribute.LIST_ID: "189a2f8b-83ee-4074-8158-726be54e57d4",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ADD_TO_WISHLIST semanticAttributes:@{
@AirbridgeAttribute.LIST_ID: @"189a2f8b-83ee-4074-8158-726be54e57d4",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ADDED_TO_CART,
semanticAttributes: [
AirbridgeAttribute.CART_ID: "421eaeb7-6e80-4694-933e-f2e1a55e9cbd",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ADDED_TO_CART semanticAttributes:@{
@AirbridgeAttribute.CART_ID: @"421eaeb7-6e80-4694-933e-f2e1a55e9cbd",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.INITIATE_CHECKOUT,
semanticAttributes: [
AirbridgeAttribute.TRANSACTION_ID: "0a7ee1ec-33da-4ffb-b775-89e80e75978a",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.INITIATE_CHECKOUT semanticAttributes:@{
@AirbridgeAttribute.TRANSACTION_ID: @"0a7ee1ec-33da-4ffb-b775-89e80e75978a",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ORDER_COMPLETED,
semanticAttributes: [
AirbridgeAttribute.VALUE: 11,
AirbridgeAttribute.TRANSACTION_ID: "8065ef16-162b-4a82-b683-e51aefdda7d5",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.IN_APP_PURCHASED: true,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ORDER_COMPLETED semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(11),
@AirbridgeAttribute.TRANSACTION_ID: @"8065ef16-162b-4a82-b683-e51aefdda7d5",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.IN_APP_PURCHASED: @(YES),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ORDER_CANCELED,
semanticAttributes: [
AirbridgeAttribute.VALUE: 11,
AirbridgeAttribute.TRANSACTION_ID: "8065ef16-162b-4a82-b683-e51aefdda7d5",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.IN_APP_PURCHASED: true,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ORDER_CANCELED semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(11),
@AirbridgeAttribute.TRANSACTION_ID: @"8065ef16-162b-4a82-b683-e51aefdda7d5",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.IN_APP_PURCHASED: @(YES),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.START_TRIAL,
semanticAttributes: [
AirbridgeAttribute.TRANSACTION_ID: "ef1e5271-0370-407c-b1e9-669a8df1dc2c",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PERIOD: "P1M",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "306a57cb-f653-4220-a208-8405d8e4d506",
AirbridgeAttribute.PRODUCT_NAME: "MusicStreamingMemebership",
AirbridgeAttribute.PRODUCT_PRICE: 15,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.START_TRIAL semanticAttributes:@{
@AirbridgeAttribute.TRANSACTION_ID: @"ef1e5271-0370-407c-b1e9-669a8df1dc2c",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.PERIOD: @"P1M",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"306a57cb-f653-4220-a208-8405d8e4d506",
@AirbridgeAttribute.PRODUCT_NAME: @"MusicStreamingMemebership",
@AirbridgeAttribute.PRODUCT_PRICE: @(15),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SUBSCRIBE,
semanticAttributes: [
AirbridgeAttribute.VALUE: 15,
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.TRANSACTION_ID: "cbe718c7-e44e-4707-b5cd-4a6a29f29649",
AirbridgeAttribute.PERIOD: "P1M",
AirbridgeAttribute.IS_RENEWAL: true,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "306a57cb-f653-4220-a208-8405d8e4d506",
AirbridgeAttribute.PRODUCT_NAME: "MusicStreamingMemebership",
AirbridgeAttribute.PRODUCT_PRICE: 15,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SUBSCRIBE semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(15),
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.TRANSACTION_ID: @"cbe718c7-e44e-4707-b5cd-4a6a29f29649",
@AirbridgeAttribute.PERIOD: @"P1M",
@AirbridgeAttribute.IS_RENEWAL: @(YES),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"306a57cb-f653-4220-a208-8405d8e4d506",
@AirbridgeAttribute.PRODUCT_NAME: @"MusicStreamingMemebership",
@AirbridgeAttribute.PRODUCT_PRICE: @(15),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.UNSUBSCRIBE,
semanticAttributes: [
AirbridgeAttribute.VALUE: 15,
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.TRANSACTION_ID: "cbe718c7-e44e-4707-b5cd-4a6a29f29649",
AirbridgeAttribute.IS_RENEWAL: true,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "306a57cb-f653-4220-a208-8405d8e4d506",
AirbridgeAttribute.PRODUCT_NAME: "MusicStreamingMemebership",
AirbridgeAttribute.PRODUCT_PRICE: 15,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.UNSUBSCRIBE semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(15),
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.TRANSACTION_ID: @"cbe718c7-e44e-4707-b5cd-4a6a29f29649",
@AirbridgeAttribute.IS_RENEWAL: @(YES),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"306a57cb-f653-4220-a208-8405d8e4d506",
@AirbridgeAttribute.PRODUCT_NAME: @"MusicStreamingMemebership",
@AirbridgeAttribute.PRODUCT_PRICE: @(15),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.AD_IMPRESSION,
semanticAttributes: [
AirbridgeAttribute.VALUE: 0.01,
AirbridgeAttribute.AD_PARTNERS: [
"mopub": [
"app_version": "5.18.0",
"adunit_id": "12345",
"adunit_name": "12345",
"adunit_format": "Banner",
"id": "12345",
"currency": "USD",
"publisher_revenue": 12345.123,
"adgroup_id": "12345",
"adgroup_name": "12345",
"adgroup_type": "12345",
"adgroup_priority": "12345",
"country": "kr",
"precision": "publisher_defined",
"network_name": "12345",
"network_placement_id": "12345",
"demand_partner_data": "12345",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.AD_IMPRESSION semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(0.01),
@AirbridgeAttribute.AD_PARTNERS: @{
@"mopub": @{
@"app_version": @"5.18.0",
@"adunit_id": @"12345",
@"adunit_name": @"12345",
@"adunit_format": @"Banner",
@"id": @"12345",
@"currency": @"USD",
@"publisher_revenue": @(12345.123),
@"adgroup_id": @"12345",
@"adgroup_name": @"12345",
@"adgroup_type": @"12345",
@"adgroup_priority": @"12345",
@"country": @"kr",
@"precision": @"publisher_defined",
@"network_name": @"12345",
@"network_placement_id": @"12345",
@"demand_partner_data": @"12345",
},
},
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.AD_CLICK,
semanticAttributes: [
AirbridgeAttribute.VALUE: 0.1,
AirbridgeAttribute.AD_PARTNERS: [
"mopub": [
"app_version": "5.18.0",
"adunit_id": "12345",
"adunit_name": "12345",
"adunit_format": "Banner",
"id": "12345",
"currency": "USD",
"publisher_revenue": 12345.123,
"adgroup_id": "12345",
"adgroup_name": "12345",
"adgroup_type": "12345",
"adgroup_priority": "12345",
"country": "kr",
"precision": "publisher_defined",
"network_name": "12345",
"network_placement_id": "12345",
"demand_partner_data": "12345",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.AD_CLICK semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(0.1),
@AirbridgeAttribute.AD_PARTNERS: @{
@"mopub": @{
@"app_version": @"5.18.0",
@"adunit_id": @"12345",
@"adunit_name": @"12345",
@"adunit_format": @"Banner",
@"id": @"12345",
@"currency": @"USD",
@"publisher_revenue": @(12345.123),
@"adgroup_id": @"12345",
@"adgroup_name": @"12345",
@"adgroup_type": @"12345",
@"adgroup_priority": @"12345",
@"country": @"kr",
@"precision": @"publisher_defined",
@"network_name": @"12345",
@"network_placement_id": @"12345",
@"demand_partner_data": @"12345",
},
},
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.COMPLETE_TUTORIAL,
semanticAttributes: [
AirbridgeAttribute.DESCRIPTION: "Finish Initial Tutorial",
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.COMPLETE_TUTORIAL semanticAttributes:@{
@AirbridgeAttribute.DESCRIPTION: @"Finish Initial Tutorial",
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ACHIEVE_LEVEL,
semanticAttributes: [
AirbridgeAttribute.LEVEL: 13,
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ACHIEVE_LEVEL semanticAttributes:@{
@AirbridgeAttribute.LEVEL: @(13),
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.UNLOCK_ACHIEVEMENT,
semanticAttributes: [
AirbridgeAttribute.ACHIEVEMENT_ID: "36a0f0bb-b153-4be1-a3e0-3cb5b2b076c1",
AirbridgeAttribute.DESCRIPTION: "Get Score Over 50",
AirbridgeAttribute.SCORE: 80,
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.UNLOCK_ACHIEVEMENT semanticAttributes:@{
@AirbridgeAttribute.ACHIEVEMENT_ID: @"36a0f0bb-b153-4be1-a3e0-3cb5b2b076c1",
@AirbridgeAttribute.DESCRIPTION: @"Get Score Over 50",
@AirbridgeAttribute.SCORE: @(80),
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.RATE,
semanticAttributes: [
AirbridgeAttribute.RATE_ID: "531c64b3-4704-4780-a306-89014ec18daf",
AirbridgeAttribute.RATE: 4.5,
AirbridgeAttribute.MAX_RATE: 5,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.RATE semanticAttributes:@{
@AirbridgeAttribute.RATE_ID: @"531c64b3-4704-4780-a306-89014ec18daf",
@AirbridgeAttribute.RATE: @(4.5),
@AirbridgeAttribute.MAX_RATE: @(5),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SHARE,
semanticAttributes: [
AirbridgeAttribute.DESCRIPTION: "Share Promotion",
AirbridgeAttribute.SHARED_CHANNEL: "CopyLink",
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SHARE semanticAttributes:@{
@AirbridgeAttribute.DESCRIPTION: @"Share Promotion",
@AirbridgeAttribute.SHARED_CHANNEL: @"CopyLink",
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SCHEDULE,
semanticAttributes: [
AirbridgeAttribute.SCHEDULE_ID: "75712915-2cd9-4e42-a85e-8d42f356f4c6",
AirbridgeAttribute.DATE_TIME: "2024-01-01T00:00:00+00:00",
AirbridgeAttribute.PLACE: "ConferenceRoom",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "abb3e65d-17bc-4b28-89e3-5e356c0ea697",
AirbridgeAttribute.PRODUCT_NAME: "ConferenceRoom",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SCHEDULE semanticAttributes:@{
@AirbridgeAttribute.SCHEDULE_ID: @"75712915-2cd9-4e42-a85e-8d42f356f4c6",
@AirbridgeAttribute.DATE_TIME: @"2024-01-01T00:00:00+00:00",
@AirbridgeAttribute.PLACE: @"ConferenceRoom",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"abb3e65d-17bc-4b28-89e3-5e356c0ea697",
@AirbridgeAttribute.PRODUCT_NAME: @"ConferenceRoom",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SPEND_CREDITS,
semanticAttributes: [
AirbridgeAttribute.TRANSACTION_ID: "22eb193d-be11-4fe4-95da-c91a196faf1c",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SPEND_CREDITS semanticAttributes:@{
@AirbridgeAttribute.TRANSACTION_ID: @"22eb193d-be11-4fe4-95da-c91a196faf1c",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
Custom Events are events defined by Airbridge users to track user actions that are unique to their services. Refer to the example code below.
import Airbridge
...
Airbridge.trackEvent(
category: "event",
semanticAttributes: [
AirbridgeAttribute.VALUE: 10,
],
customAttributes: [
"string": "string",
"number": 1000,
"boolean": true,
"object": ["key": "value"],
"array": ["value"],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:@"event" semanticAttributes:@{
AirbridgeAttribute.VALUE: @(10),
} customAttributes:@{
@"string": "string",
@"number": @(1000),
@"boolean": @(YES),
@"object": @{@"key": @"value"},
@"array": @[@"value"],
@"key": @"value",
}];
Airbridge sends user data along with events. User data allows for a more accurate ad performance measurement.
User IDs refer to the user identifier used in a service. User IDs should be unique IDs that can identify unique users across websites and apps.
Function |
Description |
---|---|
| Inputs the user ID. |
| Deletes the user ID. |
| Adds additional user identifiers. Up to 10 items can be added. |
| Deletes only specified identifiers. |
| Deletes all additional user identifiers. |
Refer to the example below.
import Airbridge
...
// identifier
Airbridge.setUserID("string")
Airbridge.clearUserID()
// addtional identifier
Airbridge.setUserAlias(key: "string", value: "string")
Airbridge.removeUserAlias(key: "string")
Airbridge.clearUserAlias()
#import <Airbridge/Airbridge.h>
...
// identifier
[Airbridge setUserID:@"string"];
[Airbridge clearUserID];
// additional identifier
[Airbridge setUserAliasWithKey:@"string" value:@"string"];
[Airbridge removeUserAliasWithKey:@"string"];
[Airbridge clearUserAlias];
Attention
Sensitive user information may be included. Send after a thorough review with a legal advisor.
Send additional user information by setting user attributes.
Function |
Description |
---|---|
| Inputs the user email. It is hashed with SHA256. |
| Deletes the user email. |
| Inputs user's phone number. The data is hashed using SHA256. |
| Deletes the user's phone number. |
| Adds additional user attributes. Up to 100 items can be added. - key: Up to 128 characters. Must satisfy the regular expression: - value: Only supports string, number, and Boolean types. Up to 1024 characters. |
| Deletes only specified attributes from the additional attributes. |
| Deletes all additional user attributes. |
Refer to the example below.
import Airbridge
...
// email, phone
Airbridge.setUserEmail("string")
Airbridge.clearUserEmail()
Airbridge.setUserPhone("string")
Airbridge.clearUserPhone()
// addtional attribute
Airbridge.setUserAttribute(key: "string", value: "string")
Airbridge.setUserAttribute(key: "number", value: 1000)
Airbridge.removeUserAttribute(key: "string")
Airbridge.clearUserAttributes()
#import <Airbridge/Airbridge.h>
...
// email, phone
[Airbridge setUserEmail:@"string"];
[Airbridge clearUserEmail];
[Airbridge setUserPhone:@"string"];
[Airbridge clearUserPhone];
// addtional attribute
[Airbridge setUserAttributeWithKey:@"string" value:@"string"];
[Airbridge setUserAttributeWithKey:@"number" value:@(1000)];
[Airbridge removeUserAttributeWithKey:@"string"];
[Airbridge clearUserAttributes];
When the Airbridge.setHashUserInformationEnabled
function is set to false
, the user's email and phone number are sent without hashing. The default setting is true
.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setHashUserInformationEnabled(false)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setHashUserInformationEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
You can reset user information with the Airbridge.clearUser
function.
import Airbridge
...
Airbridge.clearUser()
#import <Airbridge/Airbridge.h>
...
[Airbridge clearUser];
Follow the instructions below for additional setup.
Attention
The instructions below are optional. Proceed only if necessary.
Depending on the method of opening the link, it may be challenging to properly use the tracking link within the app.
By using the Airbridge.click
function or the Airbridge.impression
function, you can properly use the tracking link within the app without sending users to an external browser.
When a user clicks a tracking link within the app, the Airbridge.click
function is called. Depending on the tracking link settings, the scheme deep link is delivered, or the user is redirected to the app store or website.
import Airbridge
...
let isHandled = Airbridge.click(trackingLink: url) {
// when url is tracking link and succeed
} onFailure: { error in
// when url is tracking link and failed
// example: url is another app's tracking link, internet is not connected
}
if !isHandled {
// when url is not tracking link
}
#import <Airbridge/Airbridge.h>
...
BOOL isHandled = [Airbridge clickWithTrackingLink:url onSuccess:^{
// when url is tracking link and succeed
} onFailure:^(NSError * _Nonnull) {
// when url is tracking link and failed
// example: url is another app's tracking link, internet is not connected
}];
if (!isHandled) {
// when url is not tracking link
}
When a user engages with the tracking link, the Airbridge.impression
function is called, and the impression event data is collected.
import Airbridge
...
let isHandled = Airbridge.impression(trackingLink: url) {
// when url is tracking link and succeed
} onFailure: { error in
// when url is tracking link and failed
}
if !isHandled {
// when url is not tracking link
}
#import <Airbridge/Airbridge.h>
...
BOOL isHandled = [Airbridge impressionWithTrackingLink:url onSuccess:^{
// when url is tracking link and succeed
} onFailure:^(NSError * _Nonnull) {
// when url is tracking link and failed
}];
if (!isHandled) {
// when url is not tracking link
}
Attention
如果在 Airbridge iOS SDK 1.24.0 及以上版本的 App 中使用追踪链接,将记录 “深度链接页面浏览(Deeplink Pageview)” 目标事件(Target Event)。如果深度链接页面浏览频繁随后深度链接打开(Deeplink Open)发生,可能会影响深度链接打开的绩效。
深度链接页面浏览的的默认归因窗口为 3 天。如果希望更改此归因窗口,请联系您的 CSM。
Attention
It takes some time for the Airbridge SDK to collect attribution results. We do not recommend using attribution results for functionalities requiring real-time processing.
Use the setOnAttributionReceived
function to get the attribution data of install events.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setOnAttributionReceived({ attribution in
// when attribution is received
})
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setOnAttributionReceived:^(NSDictionary<NSString *,NSString *> * attribution) {
// when attribution is received
}];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
Depending on whether the attribution result exists or not, data is passed as follows.
If the attribution result exists, a dictionary including the values below will be passed as a callback. All keys provide the attribution data. For example, attributedChannel
contains information about the ad channel to which the ad performance is attributed.
Attribution results are delivered as a callback within 1 minute after SDK initialization. Any previous attribution results not delivered due to app termination will be delivered as a callback within 1 minute at the next app launch. Depending on the network environment, it can be delayed up to 5 minutes.
Key | Type | Description |
---|---|---|
attributedChannel | String | Channel |
attributedCampaign | String | Campaign |
attributedAdGroup | String | Ad Group |
attributedAdCreative | String | Ad Creative |
attributedContent | String | Content |
attributedTerm | String | Keyword |
attributedSubPublisher | String | Sub Publisher |
attributedSubSubPublisher1 | String | Sub Sub Publisher 1 |
attributedSubSubPublisher2 | String | Sub Sub Publisher 2 |
attributedSubSubPublisher3 | String | Sub Sub Publisher 3 |
If there is no attribution result, the following dictionary will be sent as a callback. For this data to be delivered, the app must be launched again at least 3 hours after the SDK initialization.
{
"attributedChannel": "unattributed"
}
When a user clicks a push notification, the deep link information in the payload should be passed to the Airbridge SDK to enable the collection of deep link events. Use the Airbridge.trackDeeplink
function.
import Airbridge
func application(
_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable : Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
) {
if UIApplication.shared.applicationState == .inactive {
let url = // 푸시 알림 페이로드의 딥링크
Airbridge.trackDeeplink(url)
}
}
func userNotificationCenter(
_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandlercompletionHandler: @escaping () -> Void
) {
if
UIApplication.shared.applicationState == .inactive || UIApplication.shared.applicationState == .background,
response.actionIdentifier == UNNotificationDefaultActionIdentifier
{
let url = // 푸시 알림 페이로드의 딥링크
Airbridge.trackDeeplink(url)
}
}
#import <Airbridge/Airbridge.h>
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
if (UIApplication.sharedApplication.applicationState == UIApplicationStateInactive) {
NSURL* url = // 푸시 알림 페이로드의 딥링크
[Airbridge trackDeeplinkWithUrl:url];
}
}
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
if ((UIApplication.sharedApplication.applicationState == UIApplicationStateInactive || UIApplication.sharedApplication.applicationState == UIApplicationStateBackground)
&& [response.actionIdentifier isEqual:UNNotificationDefaultActionIdentifier])
{
NSURL* url = // 푸시 알림 페이로드의 딥링크
[Airbridge trackDeeplinkWithUrl:url];
}
}
The Airbridge SDK collects all types of deep link events regardless of the service that created the deep link. If deep link events are excessively collected, you can set the setTrackAirbridgeDeeplinkOnlyEnabled
function to true
so that only Airbridge deep links are collected.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setTrackAirbridgeDeeplinkOnlyEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setTrackAirbridgeDeeplinkOnlyEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
The Airbridge SDK collects Open and Foreground events that initiate a new session. These events are not collected during an ongoing session.
By setting the setTrackInSessionLifecycleEventEnabled
function to true
, you can collect Open and Foreground events during ongoing sessions.
All collected Foreground events are recorded as Open events.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setTrackInSessionLifecycleEventEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setTrackInSessionLifecycleEventEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
Airbridge iOS SDK 4.0.0 or later is required.
Airbridge SDK supports event collection in Action Extension. You can collect events with the trackEvent function in Action Extension as follows:
1. Add App Group.
2. Navigate to [YOUR_PROJECT]>[Signing & Capabilities] in Xcode. Click + Capability and add App Groups. Enter the following values in App Groups.
group.YOUR_DOMAIN.YOUR_DOMAIN.YOUR_PRODUCT.airbridge
group.YOUR_DOMAIN.YOUR_DOMAIN.YOUR_PRODUCT.airbridge
is not a fixed value. You can use any value you want.
3. Initialize the SDK in the viewDidLoad
function of the App Extension.
import Airbridge
...
override func viewDidLoad() {
super.viewDidLoad()
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setAppGroup("group.YOUR_DOMAIN.YOUR_DOMAIN.YOUR_PRODUCT.airbridge")
.build()
Airbridge.initializeSDK(option: option)
}
#import <Airbridge/Airbridge.h>
...
- (void)viewDidLoad {
[super viewDidLoad];
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAppGroup:@"group.YOUR_DOMAIN.YOUR_DOMAIN.YOUR_PRODUCT.airbridge"];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
}
Attention
You must carefully decide on
setAppGroup
settings. You need to delete all information related to the existing Airbridge SDK to remove or change thesetAppGroup
settings. This may cause unexpected results, such as previously collected install events being collected again.
To comply with the Digital Markets Act (DMA), you must pass user consent data to Airbridge. For more information about the DMA and whether it applies to your service, see the Airbridge user guide.
If you are in the European Economic Area (EEA), you must always pass User Response information to Airbridge.
1. Determine the user's region from which they launched your app. If the user launched the app from the EEA region (eea=1
), check whether you already have consent data. If you have collected consent data, proceed to step 3.
If the user launched the app from outside the EEA region, you don't need to collect consent data.
提示
Airbridge 无法提供有关存储用户同意信息或实现同意弹窗的指导。请咨询法律顾问。
2. If you don't have consent data, collect consent data through prompts, etc. The data you need to collect in this step is adPersonalization
and adUserData
.
注意
从 2024-03-06 起,必须对 EEA 的现有用户和新用户至少取得一次同意。
必须共享给 Airbridge 的用户同意信息如下。eea
值不是用户的直接响应,也不是 Airbridge 自动收集的信息。请根据用户所在地确定 eea
值并将其共享给 Airbridge。
Airbridge 字段 |
Google 字段 |
说明 |
---|---|---|
<string> |
| 表示用户是否在 EEA,或 DMA 适用地区。该值不是用户的直接响应,也不是 Airbridge 自动收集的信息。请根据用户所在地确定 不处理除 - - |
<string> |
| 对于收集信息以提供个性化广告(Personalized Ads) 的用户同意情况。不处理除 - - |
<string> |
| 对于向 Google 发送用于广告目的用户数据的同意情况。不处理除 - - |
3. After initializing the SDK, pass the consent data to the SDK, and call the startTracking
function to collect events.
注意
必须为
eea
、adPersonalization
和adUserData
使用相同的名称。请根据同意情况正确输入
0
或1
。
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
// make sdk require start tracking explicitly
.setAutoStartTrackingEnabled(false)
.build()
// initialize sdk
Airbridge.initializeSDK(option: option)
...
// deliver informations to sdk using device alias
// based on actual region
Airbridge.setDeviceAlias("eea", "0" or "1")
// based on actual user consent
Airbridge.setDeviceAlias("adPersonalization", "0" or "1")
Airbridge.setDeviceAlias("adUserData", "0" or "1")
// start tracking explicitly
Airbridge.startTracking()
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
// make sdk require start tracking explicitly
[optionBuilder setAutoStartTrackingEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
// initialize sdk
[Airbridge initializeSDKWithOption:option];
...
// deliver informations to sdk using device alias
// based on actual region
[Airbridge setDeviceAliasWithKey:@"eea" value:"0" or "1"];
// based on actual user consent
[Airbridge setDeviceAliasWithKey:@"adPersonalization" value:"0" or "1"];
[Airbridge setDeviceAliasWithKey:@"adUserData" value:"0" or "1"];
// start tracking explicitly
[Airbridge startTracking];
Attention
If you have set up the Meta Deferred App Link, Facebook SDK's
fetchDeferredAppLink
function should not be used.
Follow the steps below to use deferred deep linking in Meta ads. The Airbridge SDK collects the Meta deferred app links first above others. If there are no Meta deferred app links, Airbridge deferred deep links are collected.
Meta does not support Meta deferred app links for SKAdNetwork campaigns.
1. Refer to the Meta ads document and install the Facebook SDK.
2. Set the setTrackMetaDeferredAppLinkEnabled
function in the Airbridge SDK to true
.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setTrackMetaDeferredAppLinkEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setTrackMetaDeferredAppLinkEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
Attention
If not activated immediately after the SDK initialization, the Install, Open, Deeplink events may not be collected.
When initializing the Airbridge SDK, all features are activated. By setting the setSDKEnabled
function to false
, you can initialize the Airbridge SDK with all features in inactive mode.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setSDKEnabled(false)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setSDKEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
You can also check the activation status of the Airbridge SDK in the following method and activate or deactivate all functions.
import Airbridge
...
Airbridge.isSDKEnabled
Airbridge.enableSDK()
Airbridge.disableSDK()
#import <Airbridge/Airbridge.h>
...
Airbridge.isSDKEnabled;
[Airbridge enableSDK];
[Airbridge disableSDK];
Airbridge sends a silent push every day between 3:00 PM and 4:00 PM (UTC) to users who performed an app event at least once in the last 6 months to check if the app has been deleted. You can check the uninstall event in the Airbridge reports and raw data export files.
Refer to the article below for the detailed setup instructions.
Additional SDK setup is required to integrate with some third-party solutions. It is recommended to complete the necessary SDK setup for integrating with third-party solutions before collecting data with the Airbridge SDK.
Refer to the articles listed below for integrating with third-party solutions.
The logs provided by the Airbridge SDK are categorized into Debug, Info, Warning, Error, and Fault levels. Debug level is the least critical log, while Fault level is the most critical log.
By default, the Airbridge SDK provides logs at Warning, Error, and Fault levels. If you input a log level using the setLogLevel
function, you can view logs from that specified level up to the Fault level.
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setLogLevel(.debug)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setLogLevel:AirbridgeLogLevelDebug];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
How to view Airbridge SDK logs only
If you want to view only Airbridge SDK logs, enter
Subsystem: co.ab180.airbridge
into the filter at the bottom right in Xcode.
Was this page helpful?
#import "AppDelegate.h"
#import <Airbridge/Airbridge.h>
@interface AppDelegate ()
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
return YES;
}
@end
import SwiftUI
import Airbridge
@main
struct ExampleApp: App {
init() {
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(option: option)
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
import ProjectDescription
let project = Project(
targets: [
.target(
infoPlist: .extendingDefault(
with: [
"NSUserTrackingUsageDescription": "YOUR_DESCRIPTION",
...
]
),
...
),
...
]
...
)
import AppTrackingTransparency
...
ATTrackingManager.requestTrackingAuthorization { _ in }
#import <AppTrackingTransparency/AppTrackingTransparency.h>
...
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {}];
import Airbridge
import AppTrackingTransparency
...
var observer: Any?
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(option: option)
...
observer = NotificationCenter.default.addObserver(
forName: UIApplication.didBecomeActiveNotification,
object: nil,
queue: nil
) { [weak self] _ in
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization { _ in }
}
if let observer = self?.observer {
NotificationCenter.default.removeObserver(observer)
}
}
#import <Airbridge/Airbridge.h>
#import <AppTrackingTransparency/AppTrackingTransparency.h>
...
id observer;
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAutoDetermineTrackingAuthorizationEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
...
__weak typeof(self) weakSelf = self;
observer = [NSNotificationCenter.defaultCenter addObserverForName:UIApplicationDidBecomeActiveNotification
object:nil
queue:nil
usingBlock:^(NSNotification * _Nonnull notification) {
if (@available(iOS 14, *)) {
[ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) {}];
}
if (weakSelf != nil && weakSelf->observer != nil) {
[NSNotificationCenter.defaultCenter removeObserver:observer];
}
}];
import SwiftUI
import Airbridge
import AppTrackingTransparency
@main
struct ExampleApp: App {
var observer: Any?
init() {
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(option: option)
observer = NotificationCenter.default.addObserver(
forName: UIApplication.didBecomeActiveNotification,
object: nil,
queue: nil
) { [weak self] _ in
if #available(iOS 14, *) {
ATTrackingManager.requestTrackingAuthorization { _ in }
}
if let observer = self?.observer {
NotificationCenter.default.removeObserver(observer)
}
}
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME",
token: "YOUR_APP_SDK_TOKEN")
.setAutoDetermineTrackingAuthorizationTimeout(second: 300)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAutoDetermineTrackingAuthorizationTimeoutWithSecond:300];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setAutoStartTrackingEnabled(false)
.build()
Airbridge.initializeSDK(option: option)
...
Airbridge.startTracking()
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAutoStartTrackingEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
...
[Airbridge startTracking];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setAutoStartTrackingEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
...
Airbridge.stopTracking()
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAutoStartTrackingEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
...
[Airbridge stopTracking];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setSDKSignature(
id: "YOUR_SDK_SIGNATURE_SECRET_ID",
secret: "YOUR_SDK_SIGNATURE_SECRET"
)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setSDKSignatureWithId:@"YOUR_SDK_SIGNATURE_SECRET_ID"
secret:@"YOUR_SDK_SIGNATURE_SECRET"];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
Airbridge.trackDeeplink(url: url)
Airbridge.trackDeeplink(userActivity: userActivity)
import Airbridge
...
Airbridge.trackDeeplink(url: url)
Airbridge.trackDeeplink(userActivity: userActivity)
import Airbridge
...
Airbridge.trackDeeplink(url: url)
Airbridge.trackDeeplink(userActivity: userActivity)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackDeeplinkWithUrl:url];
[Airbridge trackDeeplinkWithUserActivity:userActivity];
#import <Airbridge/Airbridge.h>
...
[Airbridge trackDeeplinkWithUrl:url];
[Airbridge trackDeeplinkWithUserActivity:userActivity];
#import <Airbridge/Airbridge.h>
...
[Airbridge trackDeeplinkWithUrl:url];
[Airbridge trackDeeplinkWithUserActivity:userActivity];
import Airbridge
...
// when terminated app is opened with scheme deeplink or universal links
func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
// when app is opened with scheme deeplink
if let url = connectionOptions.urlContexts.first?.url {
// track deeplink
Airbridge.trackDeeplink(url: url)
}
// when app is opened with universal links
else if let userActivity = connectionOptions.userActivities.first {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
}
}
#import <Airbridge/Airbridge.h>
...
// when terminated app is opened with scheme deeplink or universal links
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
// when app is opened with scheme deeplink
NSURL* url = connectionOptions.URLContexts.allObjects.firstObject.URL;
NSUserActivity* userActivity = connectionOptions.userActivities.allObjects.firstObject;
if (url != nil) {
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
}
else if (userActivity != nil) {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
}
}
import Airbridge
...
// when backgrounded app is opened with scheme deeplink
func scene(
_ scene: UIScene,
openURLContexts URLContexts: Set<UIOpenURLContext>
) {
guard let url = URLContexts.first?.url else { return }
// track deeplink
Airbridge.trackDeeplink(url: url)
}
#import <Airbridge/Airbridge.h>
...
// when backgrounded app is opened with scheme deeplink
- (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
NSURL* url = URLContexts.allObjects.firstObject.URL;
if (url == nil) { return; }
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
}
import Airbridge
...
// when backgrounded app is opened with universal links
func scene(
_ scene: UIScene,
continue userActivity: NSUserActivity
) {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
}
// when backgrounded app is opened with universal links
- (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
}
import Airbridge
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
import Airbridge
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
import Airbridge
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
#import <Airbridge/Airbridge.h>
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
#import <Airbridge/Airbridge.h>
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
#import <Airbridge/Airbridge.h>
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
...
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
import Foundation
...
// when app is opened with airbridge deeplink
func handleAirbridgeDeeplink(url: URL) {
// show proper content using url (YOUR_SCHEME://...)
}
import Foundation
...
// when app is opened with airbridge deeplink
func handleAirbridgeDeeplink(url: URL) {
// show proper content using url (YOUR_SCHEME://...)
}
import Airbridge
...
// when terminated app is opened with scheme deeplink or universal links
func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
// when app is opened with scheme deeplink
if let url = connectionOptions.urlContexts.first?.url {
// track deeplink
Airbridge.trackDeeplink(url: url)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
// when app is opened with universal links
else if let userActivity = connectionOptions.userActivities.first {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
}
import Foundation
...
// when app is opened with airbridge deeplink
- (void)handleAirbridgeDeeplink:(NSURL *)url {
// show proper content using url (YOUR_SCHEME://...)
}
import Foundation
...
// when app is opened with airbridge deeplink
- (void)handleAirbridgeDeeplink:(NSURL *)url {
// show proper content using url (YOUR_SCHEME://...)
}
#import <Airbridge/Airbridge.h>
...
// when terminated app is opened with scheme deeplink or universal links
- (void)scene:(UIScene *)scene willConnectToSession:(UISceneSession *)session options:(UISceneConnectionOptions *)connectionOptions {
// when app is opened with scheme deeplink
NSURL* url = connectionOptions.URLContexts.allObjects.firstObject.URL;
NSUserActivity* userActivity = connectionOptions.userActivities.allObjects.firstObject;
if (url != nil) {
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
}
else if (userActivity != nil) {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
}
}
import Airbridge
...
// when backgrounded app is opened with scheme deeplink
func scene(
_ scene: UIScene,
openURLContexts URLContexts: Set<UIOpenURLContext>
) {
guard let url = URLContexts.first?.url else { return }
// track deeplink
Airbridge.trackDeeplink(url: url)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
#import <Airbridge/Airbridge.h>
...
// when backgrounded app is opened with scheme deeplink
- (void)scene:(UIScene *)scene openURLContexts:(NSSet<UIOpenURLContext *> *)URLContexts {
NSURL* url = URLContexts.allObjects.firstObject.URL;
if (url == nil) { return; }
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
}
import Airbridge
...
// when backgrounded app is opened with universal links
func scene(
_ scene: UIScene,
continue userActivity: NSUserActivity
) {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
// when backgrounded app is opened with universal links
- (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity *)userActivity {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
}
import SwiftUI
import Airbridge
@main
struct ActualApp: App {
var body: some Scene {
WindowGroup {
ContentView()
// when app is opened with scheme deeplink or universal links
.onOpenURL { url in
// track deeplink
Airbridge.trackDeeplink(url: url)
}
}
}
}
import SwiftUI
import Airbridge
@main
struct ActualApp: App {
var body: some Scene {
WindowGroup {
ContentView()
// when app is opened with scheme deeplink or universal links
.onOpenURL { url in
// track deeplink
Airbridge.trackDeeplink(url: url)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
}
}
}
}
import Airbridge
...
// when app is opened with scheme deeplink
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]
) -> Bool {
// track deeplink
Airbridge.trackDeeplink(url: url)
return true
}
#import <Airbridge/Airbridge.h>
...
// when app is opened with scheme deeplink
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
return YES;
}
// when app is opened with universal links
func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
return true
}
#import <Airbridge/Airbridge.h>
...
// when app is opened with universal links
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
return YES;
}
import Airbridge
...
// when app is opened with scheme deeplink
func application(
_ app: UIApplication,
open url: URL,
options: [UIApplication.OpenURLOptionsKey : Any] = [:]
) -> Bool {
// track deeplink
Airbridge.trackDeeplink(url: url)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(url: url) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
return isHandled
}
#import <Airbridge/Airbridge.h>
...
// when app is opened with scheme deeplink
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
// track deeplink
[Airbridge trackDeeplinkWithUrl:url];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUrl:url onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
return isHandled;
}
// when app is opened with universal links
func application(
_ application: UIApplication,
continue userActivity: NSUserActivity,
restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void
) -> Bool {
// track deeplink
Airbridge.trackDeeplink(userActivity: userActivity)
// handle deeplink
var isHandled = Airbridge.handleDeeplink(userActivity: userActivity) { url in
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
handleAirbridgeDeeplink(url: url)
}
if isHandled { return }
// when app is opened with other deeplink
// use existing logic as it is
return isHandled
}
#import <Airbridge/Airbridge.h>
...
// when app is opened with universal links
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray<id<UIUserActivityRestoring>> * _Nullable))restorationHandler {
// track deeplink
[Airbridge trackDeeplinkWithUserActivity:userActivity];
// handle deeplink
BOOL isHandled = [Airbridge handleDeeplinkWithUserActivity:userActivity onSuccess:^(NSURL* url) {
// when app is opened with airbridge deeplink
// show proper content using url (YOUR_SCHEME://...)
[self handleAirbridgeDeeplink:url];
}];
if (isHandled) { return; }
// when app is opened with other deeplink
// use existing logic as it is
return isHandled;
}
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.build()
Airbridge.initializeSDK(option: option)
...
let isHandled = Airbridge.handleDeferredDeeplink() { url in
if let url {
// show proper content using url (YOUR_SCHEME://...)
}
}
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
...
BOOL isHandled = [Airbridge handleDeferredDeeplinkOnSuccess:^(NSURL* url) {
if (url != nil) {
// show proper content using url (YOUR_SCHEME://...)
}
}];
import Airbridge
...
// track standard event (provided by sdk)
Airbridge.trackEvent(category: AirbridgeCategory.ORDER_COMPLETED)
// track standard event (not provided by sdk)
Airbridge.trackEvent(category: "airbridge.ecommerce.order.canceled")
// track custom event
Airbridge.trackEvent(category: "eventViewed")
#import <Airbridge/Airbridge.h>
...
// track standard event (provided by sdk)
[Airbridge trackEventWithCategory:AirbridgeCategory.ORDER_COMPLETED];
// track standard event (not provided by sdk)
[Airbridge trackEventWithCategory:@"airbridge.ecommerce.order.canceled"];
// track custom event
[Airbridge trackEventWithCategory:@"eventViewed"];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ORDER_COMPLETED,
semanticAttributes: [
// action
AirbridgeAttribute.ACTION: "Tool",
// label
AirbridgeAttribute.LABEL: "Hammer",
// value
AirbridgeAttribute.VALUE: 10,
// semantic attribute (provided by sdk)
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PRODUCTS: [
[
// semantic attribute value (provided by sdk)
AirbridgeAttribute.PRODUCT_ID: "12345",
// semantic attribute value (not provided by sdk)
"name": "PlasticHammer",
],
],
// semantic attribute (not provided by sdk)
"totalQuantity": 1,
],
customAttributes: [
// custom attribute
"promotion": "FirstPurchasePromotion",
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:@"event" semanticAttributes:@{
// action
AirbridgeAttribute.ACTION: @"Tool",
// label
AirbridgeAttribute.LABEL: @"Hammer",
// value
AirbridgeAttribute.VALUE: @(10),
// semantic attribute (provided by sdk)
AirbridgeAttribute.CURRENCY: @"USD",
AirbridgeAttribute.PRODUCTS: @[
@{
// semantic attribute value (provided by sdk)
AirbridgeAttribute.PRODUCT_ID: @"12345",
// semantic attribute value (not provided by sdk)
@"name": @"PlasticHammer",
},
],
// semantic attribute (not provided by sdk)
@"totalQuantity": @(1),
}, customAttributes:@{
// custom attribute
@"promotion": @"FirstPurchasePromotion",
}];
import Airbridge
...
Airbridge.trackEvent(
category: "event",
semanticAttributes: [
AirbridgeAttribute.VALUE: 10,
],
customAttributes: [
"string": "string",
"number": 1000,
"boolean": true,
"object": ["key": "value"],
"array": ["value"],
]
)
import Airbridge
...
Airbridge.trackEvent(
category: "event",
semanticAttributes: [
AirbridgeAttribute.VALUE: 10,
],
customAttributes: [
"string": "string",
"number": 1000,
"boolean": true,
"object": ["key": "value"],
"array": ["value"],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:@"event" semanticAttributes:@{
AirbridgeAttribute.VALUE: @(10),
} customAttributes:@{
@"string": "string",
@"number": @(1000),
@"boolean": @(YES),
@"object": @{@"key": @"value"},
@"array": @[@"value"],
@"key": @"value",
}];
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:@"event" semanticAttributes:@{
AirbridgeAttribute.VALUE: @(10),
} customAttributes:@{
@"string": "string",
@"number": @(1000),
@"boolean": @(YES),
@"object": @{@"key": @"value"},
@"array": @[@"value"],
@"key": @"value",
}];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setSessionTimeout(second: 300)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setSessionTimeoutWithSecond:300];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setEventTransmitInterval(second: 0)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setEventTransmitIntervalWithSecond:0];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_TOKEN")
.setEventBufferCountLimit(Int.max)
.setEventBufferSizeLimit(gibibyte: 1024)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_TOKEN"];
[optionBuilder setEventBufferCountLimit:INT_MAX];
[optionBuilder setEventBufferSizeLimitWithGibibyte:1024];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_TOKEN")
.setClearEventBufferOnInitializeEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_TOKEN"];
[optionBuilder setClearEventBufferOnInitializeEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
Airbridge.setDeviceAlias(key: "string", value: "string")
Airbridge.removeDeviceAlias(key: "string")
Airbridge.clearDeviceAlias()
#import <Airbridge/Airbridge.h>
...
[Airbridge setDeviceAliasWithKey:@"string" value:@"string"];
[Airbridge removeDeviceAliasWithKey:@"string"];
[Airbridge clearDeviceAlias];
import Airbridge
...
Airbridge.setUserID("string")
Airbridge.setUserAlias(key: "string", value: "string")
Airbridge.setUserEmail("string")
Airbridge.setUserPhone("string")
Airbridge.setUserAttribute(key: "string", value: "string")
Airbridge.trackEvent(
category: AirbridgeCategory.SIGN_UP
)
#import <Airbridge/Airbridge.h>
...
[Airbridge setUserID:@"string"];
[Airbridge setUserAliasWithKey:@"string" value:@"string"];
[Airbridge setUserEmail:@"string"];
[Airbridge setUserPhone:@"string"];
[Airbridge setUserAttributeWithKey:@"string" value:@"string"];
[Airbridge trackEventWithCategory:AirbridgeCategory.SIGN_UP];
import Airbridge
...
Airbridge.setUserID("string")
Airbridge.setUserAlias(key: "string", value: "string")
Airbridge.setUserEmail("string")
Airbridge.setUserPhone("string")
Airbridge.setUserAttribute(key: "string", value: "string")
Airbridge.trackEvent(
category: AirbridgeCategory.SIGN_IN
)
#import <Airbridge/Airbridge.h>
...
[Airbridge setUserID:@"string"];
[Airbridge setUserAliasWithKey:@"string" value:@"string"];
[Airbridge setUserEmail:@"string"];
[Airbridge setUserPhone:@"string"];
[Airbridge setUserAttributeWithKey:@"string" value:@"string"];
[Airbridge trackEventWithCategory:AirbridgeCategory.SIGN_IN];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SIGN_OUT
)
Airbridge.clearUser()
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SIGN_OUT];
[Airbridge clearUser];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.HOME_VIEWED
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.HOME_VIEWED];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.PRODUCT_LIST_VIEWED,
semanticAttributes: [
AirbridgeAttribute.LIST_ID: "84e6e236-38c4-48db-9b49-16e4cc064386",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.PRODUCT_LIST_VIEWED semanticAttributes:@{
@AirbridgeAttribute.LIST_ID: @"84e6e236-38c4-48db-9b49-16e4cc064386",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SEARCH_RESULTS_VIEWED,
semanticAttributes: [
AirbridgeAttribute.QUERY: "Plastic",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SEARCH_RESULTS_VIEWED semanticAttributes:@{
@AirbridgeAttribute.QUERY: @"Plastic",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.PRODUCT_VIEWED,
semanticAttributes: [
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.PRODUCT_VIEWED semanticAttributes:@{
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ADD_PAYMENT_INFO,
semanticAttributes: [
AirbridgeAttribute.TYPE: "CreditCard",
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ADD_PAYMENT_INFO semanticAttributes:@{
@AirbridgeAttribute.TYPE: @"CreditCard",
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ADD_TO_WISHLIST,
semanticAttributes: [
AirbridgeAttribute.LIST_ID: "189a2f8b-83ee-4074-8158-726be54e57d4",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ADD_TO_WISHLIST semanticAttributes:@{
@AirbridgeAttribute.LIST_ID: @"189a2f8b-83ee-4074-8158-726be54e57d4",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ADDED_TO_CART,
semanticAttributes: [
AirbridgeAttribute.CART_ID: "421eaeb7-6e80-4694-933e-f2e1a55e9cbd",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.INITIATE_CHECKOUT,
semanticAttributes: [
AirbridgeAttribute.TRANSACTION_ID: "0a7ee1ec-33da-4ffb-b775-89e80e75978a",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ADDED_TO_CART semanticAttributes:@{
@AirbridgeAttribute.CART_ID: @"421eaeb7-6e80-4694-933e-f2e1a55e9cbd",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.INITIATE_CHECKOUT semanticAttributes:@{
@AirbridgeAttribute.TRANSACTION_ID: @"0a7ee1ec-33da-4ffb-b775-89e80e75978a",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ORDER_COMPLETED,
semanticAttributes: [
AirbridgeAttribute.VALUE: 11,
AirbridgeAttribute.TRANSACTION_ID: "8065ef16-162b-4a82-b683-e51aefdda7d5",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.IN_APP_PURCHASED: true,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ORDER_COMPLETED semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(11),
@AirbridgeAttribute.TRANSACTION_ID: @"8065ef16-162b-4a82-b683-e51aefdda7d5",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.IN_APP_PURCHASED: @(YES),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ORDER_CANCELED,
semanticAttributes: [
AirbridgeAttribute.VALUE: 11,
AirbridgeAttribute.TRANSACTION_ID: "8065ef16-162b-4a82-b683-e51aefdda7d5",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.IN_APP_PURCHASED: true,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
[
AirbridgeAttribute.PRODUCT_ID: "d6ab2fbe-decc-4362-b719-d257a131e91e",
AirbridgeAttribute.PRODUCT_NAME: "PlasticFork",
AirbridgeAttribute.PRODUCT_PRICE: 1,
AirbridgeAttribute.PRODUCT_QUANTITY: 1,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ORDER_CANCELED semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(11),
@AirbridgeAttribute.TRANSACTION_ID: @"8065ef16-162b-4a82-b683-e51aefdda7d5",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.IN_APP_PURCHASED: @(YES),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
@{
@AirbridgeAttribute.PRODUCT_ID: @"d6ab2fbe-decc-4362-b719-d257a131e91e",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticFork",
@AirbridgeAttribute.PRODUCT_PRICE: @(1),
@AirbridgeAttribute.PRODUCT_QUANTITY: @(1),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.START_TRIAL,
semanticAttributes: [
AirbridgeAttribute.TRANSACTION_ID: "ef1e5271-0370-407c-b1e9-669a8df1dc2c",
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.PERIOD: "P1M",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "306a57cb-f653-4220-a208-8405d8e4d506",
AirbridgeAttribute.PRODUCT_NAME: "MusicStreamingMemebership",
AirbridgeAttribute.PRODUCT_PRICE: 15,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.START_TRIAL semanticAttributes:@{
@AirbridgeAttribute.TRANSACTION_ID: @"ef1e5271-0370-407c-b1e9-669a8df1dc2c",
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.PERIOD: @"P1M",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"306a57cb-f653-4220-a208-8405d8e4d506",
@AirbridgeAttribute.PRODUCT_NAME: @"MusicStreamingMemebership",
@AirbridgeAttribute.PRODUCT_PRICE: @(15),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SUBSCRIBE,
semanticAttributes: [
AirbridgeAttribute.VALUE: 15,
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.TRANSACTION_ID: "cbe718c7-e44e-4707-b5cd-4a6a29f29649",
AirbridgeAttribute.PERIOD: "P1M",
AirbridgeAttribute.IS_RENEWAL: true,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "306a57cb-f653-4220-a208-8405d8e4d506",
AirbridgeAttribute.PRODUCT_NAME: "MusicStreamingMemebership",
AirbridgeAttribute.PRODUCT_PRICE: 15,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SUBSCRIBE semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(15),
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.TRANSACTION_ID: @"cbe718c7-e44e-4707-b5cd-4a6a29f29649",
@AirbridgeAttribute.PERIOD: @"P1M",
@AirbridgeAttribute.IS_RENEWAL: @(YES),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"306a57cb-f653-4220-a208-8405d8e4d506",
@AirbridgeAttribute.PRODUCT_NAME: @"MusicStreamingMemebership",
@AirbridgeAttribute.PRODUCT_PRICE: @(15),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.UNSUBSCRIBE,
semanticAttributes: [
AirbridgeAttribute.VALUE: 15,
AirbridgeAttribute.CURRENCY: "USD",
AirbridgeAttribute.TRANSACTION_ID: "cbe718c7-e44e-4707-b5cd-4a6a29f29649",
AirbridgeAttribute.IS_RENEWAL: true,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "306a57cb-f653-4220-a208-8405d8e4d506",
AirbridgeAttribute.PRODUCT_NAME: "MusicStreamingMemebership",
AirbridgeAttribute.PRODUCT_PRICE: 15,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.UNSUBSCRIBE semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(15),
@AirbridgeAttribute.CURRENCY: @"USD",
@AirbridgeAttribute.TRANSACTION_ID: @"cbe718c7-e44e-4707-b5cd-4a6a29f29649",
@AirbridgeAttribute.IS_RENEWAL: @(YES),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"306a57cb-f653-4220-a208-8405d8e4d506",
@AirbridgeAttribute.PRODUCT_NAME: @"MusicStreamingMemebership",
@AirbridgeAttribute.PRODUCT_PRICE: @(15),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.AD_IMPRESSION,
semanticAttributes: [
AirbridgeAttribute.VALUE: 0.01,
AirbridgeAttribute.AD_PARTNERS: [
"mopub": [
"app_version": "5.18.0",
"adunit_id": "12345",
"adunit_name": "12345",
"adunit_format": "Banner",
"id": "12345",
"currency": "USD",
"publisher_revenue": 12345.123,
"adgroup_id": "12345",
"adgroup_name": "12345",
"adgroup_type": "12345",
"adgroup_priority": "12345",
"country": "kr",
"precision": "publisher_defined",
"network_name": "12345",
"network_placement_id": "12345",
"demand_partner_data": "12345",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.AD_IMPRESSION semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(0.01),
@AirbridgeAttribute.AD_PARTNERS: @{
@"mopub": @{
@"app_version": @"5.18.0",
@"adunit_id": @"12345",
@"adunit_name": @"12345",
@"adunit_format": @"Banner",
@"id": @"12345",
@"currency": @"USD",
@"publisher_revenue": @(12345.123),
@"adgroup_id": @"12345",
@"adgroup_name": @"12345",
@"adgroup_type": @"12345",
@"adgroup_priority": @"12345",
@"country": @"kr",
@"precision": @"publisher_defined",
@"network_name": @"12345",
@"network_placement_id": @"12345",
@"demand_partner_data": @"12345",
},
},
}];
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.AD_CLICK semanticAttributes:@{
@AirbridgeAttribute.VALUE: @(0.1),
@AirbridgeAttribute.AD_PARTNERS: @{
@"mopub": @{
@"app_version": @"5.18.0",
@"adunit_id": @"12345",
@"adunit_name": @"12345",
@"adunit_format": @"Banner",
@"id": @"12345",
@"currency": @"USD",
@"publisher_revenue": @(12345.123),
@"adgroup_id": @"12345",
@"adgroup_name": @"12345",
@"adgroup_type": @"12345",
@"adgroup_priority": @"12345",
@"country": @"kr",
@"precision": @"publisher_defined",
@"network_name": @"12345",
@"network_placement_id": @"12345",
@"demand_partner_data": @"12345",
},
},
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.AD_CLICK,
semanticAttributes: [
AirbridgeAttribute.VALUE: 0.1,
AirbridgeAttribute.AD_PARTNERS: [
"mopub": [
"app_version": "5.18.0",
"adunit_id": "12345",
"adunit_name": "12345",
"adunit_format": "Banner",
"id": "12345",
"currency": "USD",
"publisher_revenue": 12345.123,
"adgroup_id": "12345",
"adgroup_name": "12345",
"adgroup_type": "12345",
"adgroup_priority": "12345",
"country": "kr",
"precision": "publisher_defined",
"network_name": "12345",
"network_placement_id": "12345",
"demand_partner_data": "12345",
],
],
]
)
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.COMPLETE_TUTORIAL,
semanticAttributes: [
AirbridgeAttribute.DESCRIPTION: "Finish Initial Tutorial",
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.COMPLETE_TUTORIAL semanticAttributes:@{
@AirbridgeAttribute.DESCRIPTION: @"Finish Initial Tutorial",
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.ACHIEVE_LEVEL,
semanticAttributes: [
AirbridgeAttribute.LEVEL: 13,
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.ACHIEVE_LEVEL semanticAttributes:@{
@AirbridgeAttribute.LEVEL: @(13),
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.UNLOCK_ACHIEVEMENT,
semanticAttributes: [
AirbridgeAttribute.ACHIEVEMENT_ID: "36a0f0bb-b153-4be1-a3e0-3cb5b2b076c1",
AirbridgeAttribute.DESCRIPTION: "Get Score Over 50",
AirbridgeAttribute.SCORE: 80,
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.UNLOCK_ACHIEVEMENT semanticAttributes:@{
@AirbridgeAttribute.ACHIEVEMENT_ID: @"36a0f0bb-b153-4be1-a3e0-3cb5b2b076c1",
@AirbridgeAttribute.DESCRIPTION: @"Get Score Over 50",
@AirbridgeAttribute.SCORE: @(80),
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.RATE,
semanticAttributes: [
AirbridgeAttribute.RATE_ID: "531c64b3-4704-4780-a306-89014ec18daf",
AirbridgeAttribute.RATE: 4.5,
AirbridgeAttribute.MAX_RATE: 5,
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.RATE semanticAttributes:@{
@AirbridgeAttribute.RATE_ID: @"531c64b3-4704-4780-a306-89014ec18daf",
@AirbridgeAttribute.RATE: @(4.5),
@AirbridgeAttribute.MAX_RATE: @(5),
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SHARE,
semanticAttributes: [
AirbridgeAttribute.DESCRIPTION: "Share Promotion",
AirbridgeAttribute.SHARED_CHANNEL: "CopyLink",
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SHARE semanticAttributes:@{
@AirbridgeAttribute.DESCRIPTION: @"Share Promotion",
@AirbridgeAttribute.SHARED_CHANNEL: @"CopyLink",
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SCHEDULE,
semanticAttributes: [
AirbridgeAttribute.SCHEDULE_ID: "75712915-2cd9-4e42-a85e-8d42f356f4c6",
AirbridgeAttribute.DATE_TIME: "2024-01-01T00:00:00+00:00",
AirbridgeAttribute.PLACE: "ConferenceRoom",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "abb3e65d-17bc-4b28-89e3-5e356c0ea697",
AirbridgeAttribute.PRODUCT_NAME: "ConferenceRoom",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SCHEDULE semanticAttributes:@{
@AirbridgeAttribute.SCHEDULE_ID: @"75712915-2cd9-4e42-a85e-8d42f356f4c6",
@AirbridgeAttribute.DATE_TIME: @"2024-01-01T00:00:00+00:00",
@AirbridgeAttribute.PLACE: @"ConferenceRoom",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"abb3e65d-17bc-4b28-89e3-5e356c0ea697",
@AirbridgeAttribute.PRODUCT_NAME: @"ConferenceRoom",
},
],
}];
import Airbridge
...
Airbridge.trackEvent(
category: AirbridgeCategory.SPEND_CREDITS,
semanticAttributes: [
AirbridgeAttribute.TRANSACTION_ID: "22eb193d-be11-4fe4-95da-c91a196faf1c",
AirbridgeAttribute.PRODUCTS: [
[
AirbridgeAttribute.PRODUCT_ID: "0117b32a-5a6c-4d4c-b64c-7858e07dba78",
AirbridgeAttribute.PRODUCT_NAME: "PlasticHammer",
AirbridgeAttribute.PRODUCT_PRICE: 10,
AirbridgeAttribute.PRODUCT_CURRENCY: "USD",
],
],
]
)
#import <Airbridge/Airbridge.h>
...
[Airbridge trackEventWithCategory:AirbridgeCategory.SPEND_CREDITS semanticAttributes:@{
@AirbridgeAttribute.TRANSACTION_ID: @"22eb193d-be11-4fe4-95da-c91a196faf1c",
@AirbridgeAttribute.PRODUCTS: @[
@{
@AirbridgeAttribute.PRODUCT_ID: @"0117b32a-5a6c-4d4c-b64c-7858e07dba78",
@AirbridgeAttribute.PRODUCT_NAME: @"PlasticHammer",
@AirbridgeAttribute.PRODUCT_PRICE: @(10),
@AirbridgeAttribute.PRODUCT_CURRENCY: @"USD",
},
],
}];
import Airbridge
...
// identifier
Airbridge.setUserID("string")
Airbridge.clearUserID()
// addtional identifier
Airbridge.setUserAlias(key: "string", value: "string")
Airbridge.removeUserAlias(key: "string")
Airbridge.clearUserAlias()
#import <Airbridge/Airbridge.h>
...
// identifier
[Airbridge setUserID:@"string"];
[Airbridge clearUserID];
// additional identifier
[Airbridge setUserAliasWithKey:@"string" value:@"string"];
[Airbridge removeUserAliasWithKey:@"string"];
[Airbridge clearUserAlias];
import Airbridge
...
// email, phone
Airbridge.setUserEmail("string")
Airbridge.clearUserEmail()
Airbridge.setUserPhone("string")
Airbridge.clearUserPhone()
// addtional attribute
Airbridge.setUserAttribute(key: "string", value: "string")
Airbridge.setUserAttribute(key: "number", value: 1000)
Airbridge.removeUserAttribute(key: "string")
Airbridge.clearUserAttributes()
#import <Airbridge/Airbridge.h>
...
// email, phone
[Airbridge setUserEmail:@"string"];
[Airbridge clearUserEmail];
[Airbridge setUserPhone:@"string"];
[Airbridge clearUserPhone];
// addtional attribute
[Airbridge setUserAttributeWithKey:@"string" value:@"string"];
[Airbridge setUserAttributeWithKey:@"number" value:@(1000)];
[Airbridge removeUserAttributeWithKey:@"string"];
[Airbridge clearUserAttributes];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setHashUserInformationEnabled(false)
.build()
Airbridge.initializeSDK(option: option)
import Airbridge
...
Airbridge.clearUser()
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setHashUserInformationEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
#import <Airbridge/Airbridge.h>
...
[Airbridge clearUser];
import Airbridge
...
let isHandled = Airbridge.click(trackingLink: url) {
// when url is tracking link and succeed
} onFailure: { error in
// when url is tracking link and failed
// example: url is another app's tracking link, internet is not connected
}
if !isHandled {
// when url is not tracking link
}
import Airbridge
...
let isHandled = Airbridge.impression(trackingLink: url) {
// when url is tracking link and succeed
} onFailure: { error in
// when url is tracking link and failed
}
if !isHandled {
// when url is not tracking link
}
#import <Airbridge/Airbridge.h>
...
BOOL isHandled = [Airbridge clickWithTrackingLink:url onSuccess:^{
// when url is tracking link and succeed
} onFailure:^(NSError * _Nonnull) {
// when url is tracking link and failed
// example: url is another app's tracking link, internet is not connected
}];
if (!isHandled) {
// when url is not tracking link
}
#import <Airbridge/Airbridge.h>
...
BOOL isHandled = [Airbridge impressionWithTrackingLink:url onSuccess:^{
// when url is tracking link and succeed
} onFailure:^(NSError * _Nonnull) {
// when url is tracking link and failed
}];
if (!isHandled) {
// when url is not tracking link
}
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setOnAttributionReceived({ attribution in
// when attribution is received
})
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setOnAttributionReceived:^(NSDictionary<NSString *,NSString *> * attribution) {
// when attribution is received
}];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
{
"attributedChannel": "unattributed"
}
import Airbridge
func application(
_ application: UIApplication,
didReceiveRemoteNotification userInfo: [AnyHashable : Any],
fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void
) {
if UIApplication.shared.applicationState == .inactive {
let url = // 푸시 알림 페이로드의 딥링크
Airbridge.trackDeeplink(url)
}
}
func userNotificationCenter(
_ center: UNUserNotificationCenter,
didReceive response: UNNotificationResponse,
withCompletionHandlercompletionHandler: @escaping () -> Void
) {
if
UIApplication.shared.applicationState == .inactive || UIApplication.shared.applicationState == .background,
response.actionIdentifier == UNNotificationDefaultActionIdentifier
{
let url = // 푸시 알림 페이로드의 딥링크
Airbridge.trackDeeplink(url)
}
}
#import <Airbridge/Airbridge.h>
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
if (UIApplication.sharedApplication.applicationState == UIApplicationStateInactive) {
NSURL* url = // 푸시 알림 페이로드의 딥링크
[Airbridge trackDeeplinkWithUrl:url];
}
}
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
if ((UIApplication.sharedApplication.applicationState == UIApplicationStateInactive || UIApplication.sharedApplication.applicationState == UIApplicationStateBackground)
&& [response.actionIdentifier isEqual:UNNotificationDefaultActionIdentifier])
{
NSURL* url = // 푸시 알림 페이로드의 딥링크
[Airbridge trackDeeplinkWithUrl:url];
}
}
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setTrackAirbridgeDeeplinkOnlyEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setTrackAirbridgeDeeplinkOnlyEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setTrackInSessionLifecycleEventEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setTrackInSessionLifecycleEventEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
override func viewDidLoad() {
super.viewDidLoad()
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setAppGroup("group.YOUR_DOMAIN.YOUR_DOMAIN.YOUR_PRODUCT.airbridge")
.build()
Airbridge.initializeSDK(option: option)
}
#import <Airbridge/Airbridge.h>
...
- (void)viewDidLoad {
[super viewDidLoad];
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setAppGroup:@"group.YOUR_DOMAIN.YOUR_DOMAIN.YOUR_PRODUCT.airbridge"];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
}
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
// make sdk require start tracking explicitly
.setAutoStartTrackingEnabled(false)
.build()
// initialize sdk
Airbridge.initializeSDK(option: option)
...
// deliver informations to sdk using device alias
// based on actual region
Airbridge.setDeviceAlias("eea", "0" or "1")
// based on actual user consent
Airbridge.setDeviceAlias("adPersonalization", "0" or "1")
Airbridge.setDeviceAlias("adUserData", "0" or "1")
// start tracking explicitly
Airbridge.startTracking()
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
// make sdk require start tracking explicitly
[optionBuilder setAutoStartTrackingEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
// initialize sdk
[Airbridge initializeSDKWithOption:option];
...
// deliver informations to sdk using device alias
// based on actual region
[Airbridge setDeviceAliasWithKey:@"eea" value:"0" or "1"];
// based on actual user consent
[Airbridge setDeviceAliasWithKey:@"adPersonalization" value:"0" or "1"];
[Airbridge setDeviceAliasWithKey:@"adUserData" value:"0" or "1"];
// start tracking explicitly
[Airbridge startTracking];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setTrackMetaDeferredAppLinkEnabled(true)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setTrackMetaDeferredAppLinkEnabled:YES];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setSDKEnabled(false)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setSDKEnabled:NO];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];
import Airbridge
...
Airbridge.isSDKEnabled
Airbridge.enableSDK()
Airbridge.disableSDK()
#import <Airbridge/Airbridge.h>
...
Airbridge.isSDKEnabled;
[Airbridge enableSDK];
[Airbridge disableSDK];
import Airbridge
...
let option = AirbridgeOptionBuilder(name: "YOUR_APP_NAME", token: "YOUR_APP_SDK_TOKEN")
.setLogLevel(.debug)
.build()
Airbridge.initializeSDK(option: option)
#import <Airbridge/Airbridge.h>
...
AirbridgeOptionBuilder* optionBuilder = [[AirbridgeOptionBuilder alloc] initWithName:@"YOUR_APP_NAME"
token:@"YOUR_APP_SDK_TOKEN"];
[optionBuilder setLogLevel:AirbridgeLogLevelDebug];
AirbridgeOption* option = [optionBuilder build];
[Airbridge initializeSDKWithOption:option];