This document introduces best practices for integrating the Airbridge SDK using a sample app. It also provides examples of how to implement and test various methods.
Before installing Airbridge into your iOS app, make sure you have the following ready:
- Xcode: It is essential for developing iOS applications and is the primary tool for this guide.
- CocoaPods: It is a dependency manager for Swift and Objective-C Cocoa projects. Airbridge SDK will be installed via CocoaPods.
- Open your terminal and navigate to the directory where you want to clone the sample app.
- Execute the following command to clone the repository:
git clone https://github.com/ab180/airbridge-ios-example
- Move to the directory where you've cloned the sample app repository
- Execute the following command to install the necessary dependencies:
pod install
Note This app's Podfile already includes the Airbridge SDK, so basically there's no need to add it.
If you've successfully completed Step 2, the project will be launched automatically.
However, if it fails to run due to some error, or you want to skip the Step 2, you can open airbridge-ios-example.xcworkspace
file to access the project.
-
Press the Run button to initiate the build process and launch the application in the simulator or a connected device.
-
Make sure the app configured correctly.
If the build process completes successfully you should see a screen with two buttons,
Track Event
&Track Event From Web
, on your simulator or device.
Warning Make sure you're working on right branch.
By default, the project operates based on the main branch, unless there are specific instructions to use another.
Note If you haven't downloaded the project or can't run the app, see the How to run part first.
Utilizing this sample application, you're able to test the transmission of in-app events within a native environment.
Additionally, you can monitor the outcome of these events through the Airbridge dashboard.
-
Press the
Track Event
button in the applicationUpon doing this, a pre-configured in-app event from the sample app will be transmitted to the Airbridge server.
-
Check the alert message
If the event was successfully transmitted to the Airbridge server, you will see an alert message indicating a successful send operation.
-
Look for the
Product View
event in the App Real-time Logs.If the event was successfully transmitted, relevant details about it will appear here. Please note, processing and displaying these events can take a few minutes, so a slight delay is expected.
Note See this guide for how to approach and use the App Real-time Logs.
Note If you couldn't find the event, go through the How to run of this guide again to make sure everything is configured properly.
Utilizing this sample application, you're able to test the transmission of in-app events within a web view environment.
Additionally, you can monitor the outcome of these events through the Airbridge dashboard.
-
Press the Track Event from Web button in the application
After that, you will see the web page with the
Track Event
button. -
Press the Track Event button in the web view
It will send a pre-configured event for tracking purposes.
-
Look for the
example-event
event in the App Real-time Logs.If the event was successfully transmitted, relevant details about it will appear here. Please note, processing and displaying these events can take a few minutes, so a slight delay is expected.
Note See this guide for how to approach and use the App Real-time Logs.
Note If you couldn't find the event, go through the How to run of this guide again to make sure everything is configured properly.
This sample application is already equipped with the necessary logic to process deep links.
By testing it, you can explore how the application responds upon clicking a deep link. This also includes a guide on how to monitor the triggering of the deep link open event via the Airbridge dashboard.
-
Activate a deep link by clicking on it from within your web browser.
This action should automatically trigger the associated app to open. If the app successfully processes the received deep link, an alert window will appear, displaying the URL of the deep link that was activated.
Note This project provides some ready-to-use deep links:
- Store fallback link
- Web fallback link (leads to sample web page if fails)
Open deeplink
button in sample web page (introduced in the above screen shot)- Any URL having
exabr
scheme(ex.exabr://example
)
-
Look for the
Deeplink Open
event in the App Real-time Logs in the app's dashboard. If the event was successfully transmitted, relevant details about it will appear here.Please note, processing and displaying these events can take a few minutes, so a slight delay is expected.
Note See this guide for how to approach and use the App Real-time Logs.