iOS Objective C API Documentation

Setting up the iOS API

Download Browse on Github

Copy the Playtomic folder and everything in it to your game's folder.

Add these frameworks to your game by clicking the project, then selecting the target -> build phases -> expanding Link Binary with Libraries.

  • libz.1.2.3.dylib (for iOS 4.x)
  • libz.1.2.5.dylib (for iOS 5.x)
  • CFNetwork.framework
  • MobileCoreServices.framework
  • SystemConfiguration.framework

Initialize the API and log the view

Before you do anything else you must initialize the API using your credentials from the dashboard. Once you have done that, you can log the view when the player opens your game or resumes it.

// Get your credentials from the Playtomic dashboard (add or select game then go to API page)
[[Playtomic alloc] initWithGameId:gameid andGUID:@"guid" andAPIKey: @"apikey"]; 
[[Playtomic Log] view];

SSL (https)

Premium users can use SSL for all API communication by calling this method before logging the view:

[Playtomic setSSL];

ARC users

If you are using the ARC mode for your project you need to use the playtomic framework.

Please download the precompiled version

If you are compiling from github, you will need to:

1) Compile LibPlaytomic project (Inside the Playtomic folder with all the Playtomic API source files)

2) Drag and drop the framework from the build folder to your project.

Also since you are using ARC you need to keep the pointer to the Playtomic instance you create.