Kantar Media Tagging Sensor iOS
Kantar Media Tagging Measurement Library for iOS
Kantar Media Tagging Sensor iOS Documentation

Kantar Media Tagging Sensor iOS User Manual

SDK 1.14.0 and higher

Starting from SDK version 1.14.0, we are dropping the usage of IDFA addressing the privacy changes that apple introduced in iOS 14.
Disabling the use of IDFA via constructor is now ignored and it defaults to NO

AppStore Submission with iOS 11

Please be aware that if you do not include the AdSupport.framework in your app you will have to disable the use of the IDFA via API in the constructor. Otherwise your App may be rejected from the AppStore for legal reasons.
For more information see the API documentation of the constructor.

Migration to iOS 9

From version 1.9.0, KMA measuerment libraries will not support iOS6 any more. Kantar Media Tagging library components are all with KMA as prefix from this version, please read more in the API documentation.

URL Scheme

Starting on iOS 9, iOS apps will have to declare what URL schemes they would like to be able to check for and open in the configuration files (plist file) of the app as it is submitted to Apple. So if your application is combining with a specific "Panel App" (e.g. Virtualmeter App), please register the URL scheme in your application, the syntax is as following:

<key>LSApplicationQueriesSchemes</key>
    <array>
        <string>tnsdkpanelapp</string>
        <string>dk.tns.ipm</string>
    </array>

App Transport Security (ATS)

Starting from iOS 9.0, App Transport Security (ATS) enforces best practices in the secure connections between an app and its back end. Migrating from http to https has to be planed for the more secure communication. However for this moment, if you decide to keep http in Kantar Media Tagging Sensor library, please add following into the project plist file, otherwise please activate ssl on in the library.
<key>NSAppTransportSecurity</key>
<dict>
        <key>NSAllowsArbitraryLoads</key>
        <false/>
        <key>NSExceptionDomains</key>
        <dict>
            <key>tns-gallup.dk</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
            </dict>
        </dict>
    </dict>
if ATS is not enabled in your application, as NSAllowsArbitraryLoads = true, then you don't need to modify anything.

Notification registration for debug purpose

From KMA tagging iOS version 1.9.1, a notification is inserted into the implementation, so that the customers are able to retrieve the requests sent by the library, see more info KMA_TAGGING_DEBUGINTERFACE_NOTIFICATION. The notification contains a NSDictionary object, with the keys "Request" and "Statuscode". The following implementation is a sample to fetch the debug info.

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@ selector(handleApplicationEvent:) name:KMA_TAGGING_DEBUGINTERFACE_NOTIFICATION object:nil];
     − (void) handleApplicationEvent:(NSNotification *)n {
        if(KMA_TAGGING_DEBUGINTERFACE_NOTIFICATION == [n name]) {
                                              have the implementation
        }
    }
 
Please Note: Set the debug mode (KMA_Spring.debug) to false in your live product, otherwise there will be a debug flag in the measurement request.

BitCode

Bitcode is a new feature on iOS 9, an intermediate representation of a compiled program. Now you have the new Kantar Media Tagging Sensor lib with bitcode enabled, for your application you have the chance to enable or disable the bitcode service.

Integration into Swift Project

If the project is a Swift project, a swift bridging header file is required for the integration, more tutorial can be found here:https://kantarmedia.atlassian.net/wiki/spaces/public/pages/159726961/Tutorial+on+how+to+import+KMA+measurement+Objective-C+library+into+Swift+project

Offline Mode

iOS-Kantar Media Tagging Sensor lib has feature so called "offlineMode". This mode can be switched on and off by using public API: KMA_Spring.offlineMode. If the lib is configured to offlineMode, Kantar Media Tagging Sensor library will hold all requests in a local buffer and send them when the device goes back online. Kantar Media Tagging Sensor lib checks the Internet connection regularly by using the iOS Timer and send the data as soon as possible. Please notice:

  1. Old requests will be dropped if too many requests pump into local buffer for the limitation in buffer size. The default buffer size is 500. The data will be stored in a local file, so the lib will not lose the requests even if the application terminates.
  2. Kantar Media Tagging Sensor lib tries to send the requests in a fixed rate, 10 seconds by default, and sends them if device is online.

WKWebView

Recently, Apple started warning users that it is going to stop accepting submissions of apps that use UIWebView APIs. Hence, we have removed that.
Starting from kantarmedia tagging 1.13.0 we are replacing UIWebview with WKWebView for retreiving Useragent. The integrator must add Webkit framework into the application for the app to run properly.

UDID

Device ID(did)Advertising ID(ai)MAC ID(mid)

ID_For_Vendor(ifv)

iOS 4
MAC ID(mid)
iOS 5
MAC ID(mid)
iOS 6
Advertising ID(ai)MAC ID(mid)ID_For_Vendor(ifv)
iOS 7
Advertising ID(ai)
ID_For_Vendor(ifv)
iOS 8
Advertising ID(ai)
ID_For_Vendor(ifv)
iOS 9
Advertising ID(ai)
ID_For_Vendor(ifv)

Considering that the Apple private policy is changing all the time, Kantar Media Tagging Sensor libs have to adapt different UDIDs for identifying the end user's devices.

  1. Since iOS 6, device ID and mac ID are not available anymore,
  2. Switch to Advertising ID and ID_For_Vendor

Please attention: Apple will reject all the applications which retrieve advertising ID but with no advertising content provided. So Advertising-Framework is linked as optional in Kantar Media Tagging Sensor libs, If the Advertising ID should be used as udid, please import Advertising-Framework into your projects.

Please attention: Only initialize Kantar Media Tagging Sensor lib once in your whole project, you only need one KMA_Spring object.

NOTICE

Please Note: Some components in Kantar Media Tagging Sensor libs are running in background threads. Please keep the initialization and usage of Kantar Media Tagging Sensor libs in your main thread, Kantar Media Tagging Sensor libs will not block your UI display.

Package Info

File

Description

spring-appsensor-device.a

This is the version that has been compiled with ARM support and which is intended for execution on iOS devices

spring-appsensor-simulator.a

This is the version that has been compiled with x86 support and which is intended for execution on iOS simulator

spring-appsensor-fat.a

This is a combined version of the two libraries above, which can be executed on both, iOS devices and iOS simulator because it contains code for ARM and x86 execution. This file is called "fat" as it is roughly double the size (because it combines both versions)

Note

If size does not matter for the app, the "fat" version is the carefree option to be used for execution on simulator and real devices.

****RELEASE NOTE****