iOS
iOS is a proprietary mobile operating system developed by Apple Inc. It is designed specifically for Apple’s hardware, including the iPhone, iPad, and iPod Touch.
Configuration
Integrate iOS data into Boltic in the following manner
To connect with an App:
- Enter a Source Name by which you want to refer to this iOS integration.
- Test and Save your source.
Once source is created use the below steps to integrate it to your iOS app
Step 1: Add FyndAnalytics to Your Project
First, you need to add our SDK's .aar file to your project. Perform the following steps:
- Open your Xcode project.
- Navigate to the target settings by selecting your project in the navigator, then choose the target for your app.
- Go to the "General" tab.
- Scroll down to "Frameworks, Libraries, and Embedded Content".
- Click on the "+" button to add a new framework.
- Select "Add Other..." and then "Add Files...".
- Navigate to the location of FyndAnalytics.xcframework on your computer, select it, and click "Open".
- Ensure that "Embed & Sign" is selected for the framework in the "Embed" column.
Step 2: Integrate FyndAnalytics
- Import FyndAnalytics at the top of your Swift file where you intend to use it.
import FyndAnalytics
- Configure FyndAnalytics in the viewDidLoad method of your ViewController or the appropriate initialization point in your application. Use the AnalyticsConfiguration class to customize your setup.
override func viewDidLoad() {
super.viewDidLoad()
let configuration = FyndAnalyticsConfiguration(writeKey: 'your_access_token')
configuration.trackApplicationLifecycleEvents = true
configuration.recordScreenViews = true
configuration.crypto = .none
configuration.flushAt = 1
FyndAnalytics.debug(true)
FyndAnalytics.setup(with: configuration)
}
- Track Events by calling the track method on Analytics.shared() with an event name and properties dictionary.
@IBAction func onEvent1(_ sender: Any) {
FyndAnalytics.shared().track("Magic Potion Mixed", properties: ["type": "Elixir of Invincibility", "effectDuration": 24.0])
}
Repeat this for other events you wish to track, as demonstrated in the provided Swift code.
You have now successfully integrated your iOS App to Boltic!