Objective-C Client Reference
Class PlayerIO
Language: Objective-C
Entry class for the initial connection to Player.IO.
Here is an example of using the class to authenticate to Player.IO:
Methods | |||
---|---|---|---|
+ (PIOAdTrack*) |
|
||
+ (void) |
|
||
+ (void) |
|
||
+ (NSString*) |
|
||
+ (NSString*) |
|
||
+ (PIOGameFS*) |
|
||
+ (void) |
|
||
+ (void) |
|
adTrack
Get access to AdTrack service. Please see the AdTrack documentation page at Yahoo Games Network website for setup instructions.
Return Value
PIOAdTrack* | |
authenticateWithGameId:connectionId:authenticationArguments:playerInsightSegments:successBlock:
Connects to Player.IO using as the given user
Arguments
NSString* | gameId |
NSString* | connectionId |
NSDictionary* | authenticationArguments |
NSArray* | playerInsightSegments |
void(^)(PIOClient*client) | successBlock |
authenticateWithGameId:connectionId:authenticationArguments:playerInsightSegments:successBlock:errorBlock:
Connects to Player.IO using as the given user
Arguments
NSString* | gameId |
NSString* | connectionId |
NSDictionary* | authenticationArguments |
NSArray* | playerInsightSegments |
void(^)(PIOClient*client) | successBlock |
void(^)(PIOError*error) | errorBlock |
calcAuth256WithUserId:sharedSecret:
Calculate an auth hash for use in the connect method.
Arguments
NSString* | userId |
NSString* | sharedSecret |
Return Value
NSString* | The generated auth hash (based on SHA-256) |
calcAuthWithUserId:sharedSecret:
Calculate an auth hash for use in the connect method.
Arguments
NSString* | userId |
NSString* | sharedSecret |
Return Value
NSString* | The generated auth hash. (This is based on SHA-1, which has been deprecated. Use CalcAuth256 for values based on SHA-256.) |
gameFSWithGameId:
Get access to GameFS for a specific game, without connecting to the game.
Arguments
NSString* | gameId |
Return Value
PIOGameFS* | An instance of PIOGameFS. |
handlePlayLinkWithURL:
Place the code below at the beginning of your "application:didFinishLaunchingWithOptions:" method to handle PlayLinks if ([launchOptions objectForKey:UIApplicationLaunchOptionsURLKey]){ [PlayerIO handlePlayLinkWithURL:[launchOptions objectForKey:UIApplicationLaunchOptionsURLKey]]; }
Arguments
NSURL* | url |
logout
Shut down the client and remove all stored credentials.