1. TnkAd SDK‎ > ‎

4) iOS Settings

[Add Library]
  • Unzip the TnkAd SDK package file you downloaded, drop libtnksdk.a and tnksdk.h file in your Xcode project.
  • Link following libraries. Make sure that AdSupport.framework should be linked as Optional.
 Library Description 
 libtnksdk.a  TnkAd SDK
 libz.tbd  Compression & decompression of data
 MediaPlayer.framework  Media Player
 AdSupport.framework  To get IdfA value of the device. (set as Optional)
 SystemConfiguration.framework To get Wifi state of the device. 

[Initialize TnkSession Instance]

You have to initialize the instance of TnkSession before any invocation of APIs. There are 2 ways to initialize TnkSession instance.

1) Initialization by API invocation.
  • Put initializing code with your App ID value in applicationDidFinishLaunchingWithOption method of Application Delegate.
  • See the sample below. (Replace your-application-id-from-tnk-site with your App Id value.)

Sample Code

#import "tnksdk.h"

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions


    // Tnk Initialization

    [TnkSession initInstance:@"your-application-id-from-tnk-site"];

    // ...


2) Initialization by info.plist
  • Add "tnkad_app_id" key with your App ID in your info.plist file. 

[App Transport Security]

In iOS9, you have to add ATS configurations below in your info.plist file.

iOS9 App Transport Security

<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>tnkfactory.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSExceptionRequiresForwardSecrecy</key> <false/> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> </dict>