Instance Method

sendReminderToParticipants:localizableMessageKey:arguments:completionHandler:

Send a reminder to one or more game participants.

Declaration

- (void)sendReminderToParticipants:(NSArray<GKTurnBasedParticipant *> *)participants localizableMessageKey:(NSString *)key arguments:(NSArray<NSString *> *)arguments completionHandler:(void (^)(NSError *error))completionHandler;

Parameters

participants

An array of GKTurnBasedParticipant objects containing the participants who are to receive the reminder.

key

The location of the alert message string in the Localizable.strings file for the current localization.

arguments

An array of objects to be substituted using the format string.

completionHandler

A block to be called after the reminder has been sent.

The block receives the following parameters:

error

If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.

Discussion

When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls your completion handler. The completion handler is always called on the main thread.

When this method is called, each recipient receives a push notification using the supplied localizable message. This allows the game to send reminders that a turn or exchange request needs action. The receiver will have a turn event generated for the current game.

See Also

Sending Messages Between Players

- setLocalizableMessageWithKey:arguments:

Allows the developer to display a message at the end of a turn or match.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software