This document provides an overview of how to integrate, set-up and start tracking events using the iOS SDK.
Always check the Github Release for the latest version of the SDK
The latest version of iOS SDK: v2.0.0
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries.
CocoaPods is distributed as a ruby gem and is installed by running the following commands in Terminal.app:
$ sudo gem install
Depending on your Ruby installation, you may not have to run as sudo to install the cocoapods gem.
Project dependencies to be managed by CocoaPods are specified in a file called Podfile. Create this file in the same directory as your Xcode project (.xcodeproj) file:
$ touch Podfile $ open -a Xcode Podfile
You just created the pod file and opened it using Xcode!
Copy and paste the following lines into the Xcode window:
target 'APP NAME TARGET' do pod 'BlueShift-iOS-SDK' end
If you are integrating attachment media type push notification with Notification Service Extension (for iOS 10 and above), add the following lines:
target 'APP EXTENSION TARGET NAME' do pod 'BlueShift-iOS-Extension-SDK' end
If you are using Swift, create bridge-header for your app and import the following header:
Now you can install the dependencies in your project by Terminal:
$ pod install
From now on, be sure to always open the generated Xcode workspace, (.xcworkspace) instead of the project file when building your project (.xcodeproj):
$ open <ProjectName>.xcworkspace