What platforms does Countly iOS SDK support?

Even though its official name is Countly iOS SDK, it supports all Apple platforms (macOS, tvOS and watchOS), in addition to iOS. You can use the same SDK for all kinds of projects with different set of features available for each platform. You can also see how to integrate it into your projects by checking our sample apps here.

Which features are available for each platform?

In addition to Analytics, Custom Events and User Profiles features, Countly iOS SDK has Push Notifications, Crash Reporting, Auto View Tracking, Remote Config and Star-Rating features. Availability of these features for platforms are as follows:

  • iOS
    Analytics, Custom Events, User Profiles, Push Notifications, Crash Reporting, Auto View Tracking, Star-RatingRemote Config

  • macOS
    Analytics, Custom Events, User Profiles, Push Notifications,Crash ReportingRemote Config

  • tvOS
    Analytics, Custom Events, User Profiles, Auto View Tracking,Crash Reporting, Remote Config

  • watchOS
    Analytics, Custom Events, User Profiles, Crash Reporting,Remote Config

Can I integrate Countly iOS SDK using CocoaPods?

We keep our Countly.podspec file up-to-date, so you can integrate Countly iOS SDK using CocoaPods. But, please make sure you read our notes to avoid issues.

How can I tell which Countly iOS SDK version I am using?

You can check for kCountlySDKVersion constant in Countly iOS SDK source. It is defined like NSString* const kCountlySDKVersion = @"18.08";

What is the difference between Default Properties and Custom Properties of User Profiles?

User Profiles (only available in Enterprise Edition) has two kinds of properties: Default Properties and Custom Properties.

Default Properties are predefined fields like name, username, email, birth year, organization, gender, phone number and profile picture. They are displayed on their own place in User Profiles section. You can set them using default properties on Countly.user singleton ( Ex: = @""; ) and record them using [Countly.user save]; method.

Custom Properties are custom defined key-value pairs. You can set them using Countly.user.custom dictionary ( Ex: Countly.user.custom = @{@"testkey1":@"testvalue1", @"testkey2":@"testvalue2"}; ) and record them using [Countly.user save]; method as well.

In addition to this, you can use Custom Property Modifers to set, unset or modify Custom Properties and record your changes using [Countly.user save]; method again.

For details please see User Profiles documentation.

How can I handle logged in and logged out users?

When a user logs in on your app and you have a uniquely identifiable string for that user (like user ID or email address), you can use it instead of device ID to track all info afterwards, without losing all the data generated by that user so far. You can use userLoggedIn: method ( Ex: [Countly.sharedInstance userLoggedIn:@""]; ). This will replace previously used device ID on device, and merge all existing data on server.

Later, when the user logs out, you can use [Countly.sharedInstance userLoggedOut]; method which will switch back to default deviceID and track that device anonymously.

Why events are not displayed on Countly Server dashboard?

Custom events are queued and not sent to server until next updateSessionPeriod (60 seconds by default) or eventSendThreshold (10 by default) is reached. So, a little bit delay for displaying custom events on Countly Server dashboard may be expected, while seeing session data immediately.

In addition to this, Countly iOS SDK sends previously stored requests if exists any, followed by a begin_session request, when it starts. If your app records any custom events meanwhile, these event will be queued and sent to server when all previously queued request are successfully completed.

How should I answer IDFA related questions on App Store Connect?

Apple has some rules on IDFA usage in the apps depending on purpose. If you are getting warnings about it while sending your app to the App Store, please read this document.

Why some of the requests can not be processed by Countly Server?

There was a query string encoding bug in Countly iOS SDK on versions 16.02.01 and 16.06. Due to this bug, some carrier names (especially Chinese) in query string cannot be parsed. It is fixed on version 16.06.1. If you are using one of the specified versions, please update the SDK.

Is it possible to use Countly iOS SDK with another crash SDK?

In iOS there can be only one uncaught exception handler. Even though it is possible to save the previous handler and pass the uncaught exception to the previous handler as well, it is not safe to assume that it will work in all cases. As we can't know how other SDKs are implemented or whether iOS will give enough time for the all the handlers to do their work before terminating the app. So, we advise to use Countly as the only crash handler.

Why are my test crashes not reported?

If you are running your app with Xcode debugger attached while forcing a test crash, Countly iOS SDK can not handle the crash, as debugger will be intercepting. Please make sure you run your app without Xcode debugger attached.

How can I manually record push notification custom button actions?

If you have set doNotShowAlertForNotifications flag on initial configuration object to handle push notifications manually, you can create your own custom UI to show notification message and action buttons as you wish. For this, just implement - (void) application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler method in your application's delegate. For details of handling notification manually please see Handling Notifications Manually section.

How can I get rid of compiler warning "No rule to process file"?

If you get Warning: no rule to process file '../countly-sdk-ios/' of type net.daringfireball.markdown for architecture arm64 in Xcode, it means (and/or file is added to Build Phases > Compile Sources in your target. Please remove from Compile Sources list.

What is the average data size of a Countly iOS SDK request sent to Countly Server?

While there are several types of requests Countly iOS SDK sends to Countly Server, most common ones are:

  • Begin Session Request It is sent on every app launch (and session start after coming back from the background), and it includes basic metrics.
    An example Begin Session request (498 bytes) :
  • Update Session Request It is sent every 60 seconds by default, but it depends Countly iOS SDK initial configuration.
    An example Update Session request (233 bytes) :
  • End Session Request It is sent at the end of a session, when the app goes to background or terminates.
    An example End Session request (247 bytes) :
  • Other Requests For Events, User Details, Push Notifications, Crash Reporting, View Tracking, Feedbacks, Consents and some other features, Countly iOS SDK sends various requests with various data sizes. Frequency and size of these requests depend on Countly iOS SDK initial configuration and your app's use cases, as well as the end user.

What data metrics is collected by Countly iOS SDK?

Countly iOS SDK collects following metrics by default:

  • Device Model
  • Screen Resolution
  • Screen Density
  • OS Name
  • OS Version
  • App Version
  • Locale Identifier
  • Carrier

And if Apple Watch feature is enabled: - Paired Apple Watch Presence - watchOS App Install Status


Why do push notification action events not reported?

Notification action event is recorded when user interacts with the notification and system calls didReceiveNotificationResponse: method.

If you tap on the notification, but still do not get any action events, please check the following possible problem points:
1) You are setting UNUserNotificationCenter.currentNotificationCenter's delegate manually at some point, so Countly iOS SDK can not handle the notification?
2) requiresConsent flag is enabled on initial config, but consent for Push Notifications feature is not granted? (Note that this has nothing to do with iOS notification permission)
3) Notification is not coming from Countly and it does not have any value for kCountlyPNKeyNotificationID = @"i"  key in it?



Was this article helpful?
0 out of 0 found this helpful

Looking for help?