This tutorial will help you to start sending data from your iOS APP to EPICA.
We use the excellent Analytics for iOS library to make simple to send data to EPICA from iOS devices. Utilizing this library 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.
Step 1. Install the SDK
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 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 EPICA 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.
Then in your application delegate’s -
application:didFinishLaunchingWithOptions: method, setup the SDK like so:
SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"YOUR_WRITE_KEY"];
configuration.trackApplicationLifecycleEvents = YES; // Enable this to record certain application events automatically!
configuration.recordScreenViews = YES; // Enable this to record screen views automatically!
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.
Import the SDK in the files that you use it with:
Step 2. Identify Users
Step 3. Track Actions
Step 3. Track Screen Views
Until our changes are merged into the analytics-ios master the 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.
Proxy HTTP Calls
This feature is not supported at this moment.