PlayerIO

The fastest way to build online games without breaking a sweat.

Objective-C Client Reference

Multiplayer  class documentationClass PIOAdTrack

Language: Objective-C

The Player.IO AdTrack service.

To use the AdTrack service successfully, you need to do the following:

Implement PlayLinks by completing the necessary setup in the Control Panel, and adding your custom url scheme to the "URL Types" of your app or your app's Info.plist file.

Call the "- startWithUrl:gameId:playerInsightSegments:options:" method from within your UIAppDelegate's "- application:didFinishLaunchingWithOptions:"

Call the "- startWithLaunchOptions:gameId:playerInsightSegments:options:"; method from within your your UIAppDelegate's "- application:openURL:sourceApplication:annotation:"

Track the payments made from within your app by calling "- trackExternalPaymentWithCurrency:amount:"

Methods

 
- (InstallSourceType)
installSource
Returns a value indicating the campaign from which this app was installed from. The possible values are: kYGN_INSTALL_SOURCE_UNDETERMINED, kYGN_INSTALL_SOURCE_YAHOO, and kYGN_INSTALL_SOURCE_UNKNOWN
- (void)
startWithLaunchOptions:gameId:playerInsightSegments:options:
Starts the AdTrack service. Should be called from within the "- application:didFinishLaunchingWithOptions:" method.
- (void)
startWithUrl:gameId:playerInsightSegments:options:
Starts the AdTrack service. This method should be called from within the "- application:openURL:sourceApplication:annotation:" method.
- (void)
trackExternalPaymentWithCurrency:amount:
Track a completed payment in AdTrack from an external non-PayVault payment method.

installSource

Returns a value indicating the campaign from which this app was installed from. The possible values are: kYGN_INSTALL_SOURCE_UNDETERMINED, kYGN_INSTALL_SOURCE_YAHOO, and kYGN_INSTALL_SOURCE_UNKNOWN

Return Value

InstallSourceType

startWithLaunchOptions:gameId:playerInsightSegments:options:

Starts the AdTrack service. Should be called from within the "- application:didFinishLaunchingWithOptions:" method.

Arguments

NSDictionary* launchOptions
The launchOptions passed in.
NSString* gameId
The gameId of tghe game to connect to.
NSArray* segments
Optional segments that you may wish to pass in.
NSDictionary* options
A dictionary of key value pairs that can be passed in

startWithUrl:gameId:playerInsightSegments:options:

Starts the AdTrack service. This method should be called from within the "- application:openURL:sourceApplication:annotation:" method.

Arguments

NSURL* url
The url passed in
NSString* gameId
The gameId of tghe game to connect to.
NSArray* segments
Optional segments that you may wish to pass in.
NSDictionary* options
A dictionary of key value pairs that can be passed in

trackExternalPaymentWithCurrency:amount:

Track a completed payment in AdTrack from an external non-PayVault payment method.

Arguments

NSString* currency
The currency the payment was made in.
int amount
The amount of the payment in minor units (i.e. cents) in the given currency.