We use the excellent Analytics for iOS library to make dead simple to send your data to poder.IO and other analytics or marketing tools from iOS devices. Utilizing this tool you don’t have to learn, test or implement a new API every time.
Since the library has a very useful documentation here we describe only the first steps and few differences.
The recommended way to install Analytics for iOS is via Cocoapods, since it means you can create a build with specific integrations, and because it makes it dead simple to install and upgrade.
First, add the Analytics dependency to your Podfile. We have made some changes in the library in order to work with our own poder.IO back-end seamlessly. We would like to generalize these changes and send pull request to the original repository but until that we suggest to use our own repository in the Podfile.
pod 'Analytics', :git => ‘https://bitbucket.org/poderio/analytics-ios.git’, :tag => ‘3.6.9-poderio’
Then in your application delegate’s -
application:didFinishLaunchingWithOptions: method, setup the SDK like so:
SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"];
NOTE: Automatically tracking lifecycle events (Application Opened, Application Installed, Application Updated) and screen views is optional via initialization config parameters, but highly recommended to hit the ground running with core events! See below for more info!
And of course, import the SDK in the files that you use it with:
Until our changes are merged into the analytics-ios master we release our version a bit delayed. After the origin is released we take over it and release our bespoke version with ‘-poderio’ postfix in the version number.
This feature is not supported at this moment.