Getting Started

1. Install the SDK

Cocoapods

The easiest way to use Antsomi in your iOS project is with CocoaPodsarrow-up-right. Before you begin, please ensure that you are using Ruby v2.0.0arrow-up-right or higher (knowledge of Ruby syntax isn’t needed to install the SDK).

Step 1: Download CocoaPods

CocoaPods is a dependency manager for Swift and Objective-C projects. You can install CocoaPods by running the following command.

$ sudo gem install cocoapods
circle-exclamation

Step 2: Add a Podfile

In the terminal, navigate to your Xcode project directory and create a Podfile by running the following command.

$ pod init

Step 3: Edit your Podfile

Add the following in your Podfile under your project's target.

# Avoid use_frameworks! declaration in your Podfile.

target 'YourAppTarget' do
  pod 'AntsomiFramework', '1.1.59'
end

Step 4: Install AntsomiFramework SDK

To install the Antsomi SDK, navigate to your Xcode project directory and run the following command.

Step 5: Stop using your project file, YOUR-PROJECT-NAME.xcodeproj. And start using the project workspace file created by CocoaPods, YOUR-PROJECT-NAME.xcworkspace from now on.

  • Doing so will ensure that the AntsomiFramework SDK is properly loaded.

2. Initialize the SDK

Step 1: Add Antsomi.Configuration to the application:didFinishLaunchingWithOptions: of your AppDelegate.

  • We recommend that you make this call at the end of didFinishLaunchingWithOptions:.

Step 2: Add registerForNotification to the application:didRegisterForRemoteNotificationsWithDeviceToken: of your AppDelegate.

circle-info

If you haven't had your CDP365 Application ID, please follow this instructionarrow-up-right.


You have successfully integrated the Antsomi SDK with your iOS app and are sending user session and system events data to your Antsomi account. Please note that it may take a up to few minutes for your data to reflect on your dashboard.

Last updated