PlayerIO

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

Objective-C Client Reference

Multiplayer  class documentationClass PIOGameRequests

Language: Objective-C

The Player.IO GameRequests service

Properties

 
waitingRequests
The list of oldest received requests that are waiting to be processed and deleted.

Methods

 
- (void)
deleteWithGameRequests:successBlock:
Delete the given requests synchronously. Will also update the Received property after deletion is complete.
- (void)
deleteWithGameRequests:successBlock:errorBlock:
Delete the given requests asynchronously. Will also update the Received property after deletion is complete.
- (void)
refreshWithSuccessBlock:
Refresh the list of received requests synchronously. Refresh the list of received requests asynchronously.
- (void)
refreshWithSuccessBlock:errorBlock:
Refresh the list of received requests asynchronously.
- (void)
sendWithRequestType:requestData:recipients:successBlock:
Send a GameRequest to the specified recipients synchronously.
- (void)
sendWithRequestType:requestData:recipients:successBlock:errorBlock:
Send a GameRequest to the specified recipients asynchronously.
- (void)
showSendDialogWithRequestType:requestData:closeBlock:
Show a dialogue to send GameRequests

@property (nonatomic) NSArray * waitingRequests

The list of oldest received requests that are waiting to be processed and deleted.

deleteWithGameRequests:successBlock:

Delete the given requests synchronously. Will also update the Received property after deletion is complete.

Arguments

NSArray* requests
The array of GameRequests to delete.
void(^)() successBlock
Callback block that will be called when the operation succeeds.

deleteWithGameRequests:successBlock:errorBlock:

Delete the given requests asynchronously. Will also update the Received property after deletion is complete.

Arguments

NSArray* requests
The array of PIOGameRequests to delete.
void(^)() successBlock
Callback block that will be called when the operation succeeds.
void(^)(PIOError*) errorBlock
block that will be called instead of successBlock if an error occurs during the operation.

refreshWithSuccessBlock:

Refresh the list of received requests synchronously. Refresh the list of received requests asynchronously.

Arguments

void(^)() successBlock
Callback block that will be called when the operation succeeds.

refreshWithSuccessBlock:errorBlock:

Refresh the list of received requests asynchronously.

Arguments

void(^)() successBlock
Callback block that will be called when the operation succeeds.
void(^)(PIOError*) errorBlock
Callback block that will be called instead of successBlock if an error occurs during the operation.

sendWithRequestType:requestData:recipients:successBlock:

Send a GameRequest to the specified recipients synchronously.

Arguments

NSString* requestType
The request type of the request to send.
NSDictionary* requestData
Data that will be available to the recipient of the request with information about the request. Useful for passing any kind of data to the recipeint.
NSArray* recipients
The recipients to send this request to.
void(^)() successBlock
Callback block that will be called when the operation succeeds.

sendWithRequestType:requestData:recipients:successBlock:errorBlock:

Send a GameRequest to the specified recipients asynchronously.

Arguments

NSString* requestType
The request type of the request to send.
NSDictionary* requestData
Data that will be available to the recipient of the request with information about the request. Useful for passing any kind of data to the recipeint.
NSArray* recipients
The recipients to send this request to.
void(^)() successBlock
Callback block that will be called when the operation succeeds.
void(^)(PIOError*) errorBlock
Callback that will be called instead of successBlock if an error occurs during the operation.

showSendDialogWithRequestType:requestData:closeBlock:

Show a dialogue to send GameRequests

Arguments

NSString* requestType
The request type of the request to send.
NSDictionary* requestData
Data that will be available to the recipient of the request with information about the request. Useful for passing any kind of data to the recipeint.
void(^)(PIOGameRequestSendDialogResult*) closeBlock
Callback block that will be called when the dialog close, with information about the requests sent. NOTE: There is no way to tell if the end-user copied a link and sent it to another player.