##What's Countly?
Countly is an innovative, real-time, open source mobile analytics application. It collects data from mobile devices, and visualizes this information to analyze mobile application usage and end-user behavior. There are two parts of Countly: the server that collects and analyzes data, and mobile SDK that sends this data. Both parts are open source with different licensing terms.
This repository includes the SDK for iOS.
##Installing iOS SDK
Countly iOS SDK includes necessary tools to track your application. In order to integrate SDK to your application, follow these steps.
- Download Countly iOS SDK.
- Add these files to your project under Xcode:
Countly.h
Countly.m
Countly_OpenUDID.h
Countly_OpenUDID.m
- In the project navigator, select your project
- Select your project
- Select the Build Phases tab
- Open Link Binaries With Libraries expander
- Click the + button
- Select CoreTelephony.framework, select Optional (instead of Required)
- (optional) Drag and drop the added framework to the Frameworks group
- In your application delegate, import
Countly.h
and insideapplication:didFinishLaunchingWithOptions:
add the line;[[Countly sharedInstance] start:@"YOUR_APP_KEY" withHost:@"https://YOUR_API_HOST.com"];
at the beginning of the function.
Note: if you use Countly Cloud, you must set withHost parameter to https://cloud.count.ly for step 10.
It should finally look like this:
#import "Countly.h" // newly added line - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [[Countly sharedInstance] start:@"TYPE_HERE_YOUR_APP_KEY_GENERATED_IN_COUNTLY_ADMIN_DASHBOARD" withHost:@"http://TYPE_HERE_URL_WHERE_API_IS_HOSTED"]; // newly added line // your code }
Note: If your project uses automatic reference counting (ARC), you should disable it for the sources Countly_OpenUDID.m
and Countly.m
:
- Select your project
- Select the Build Phases tab
- Open Compile Sources tab
- Double click
Countly.m
andCountly_OpenUDID.m
and add-fno-objc-arc
flag
Note: Before upgrading to a new SDK, do not forget to remove the existing, older SDK from your project.
Check Countly Server source code here:
There are also other Countly SDK repositories below:
- Countly iOS SDK
- Countly Android SDK
- Countly Windows Phone SDK
- Countly Blackberry Webworks SDK
- Countly Blackberry Cascades SDK (Community supported)
- Countly Mac OS X SDK (Community supported)
- Countly Appcelerator Titanium SDK (Community supported)
- Countly Unity3D SDK (Community supported)
##How can I help you with your efforts? Glad you asked. We need ideas, feedbacks and constructive comments. All your suggestions will be taken care with upmost importance.
We are on Twitter and Facebook if you would like to keep up with our fast progress!
For community support page, see http://support.count.ly.