Deprecated GKAchievement Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in iOS 6.0

hidden

A Boolean value that states whether this achievement is normally kept secret from the player. (read-only) (Deprecated in iOS 6.0. Use the hidden property on the GKAchievementDescription class instead.)

@property(assign, getter=isHidden, readonly, nonatomic) BOOL hidden
Availability
  • Available in iOS 4.1 and later.
  • Deprecated in iOS 6.0.
Declared In
GKAchievement.h

Deprecated in iOS 7.0

issueChallengeToPlayers:message:

Issue an achievement challenge to a list of players. (Deprecated in iOS 7.0.)

- (void)issueChallengeToPlayers:(NSArray *)playerIDs message:(NSString *)message
Parameters
playerIDs

An array of NSString objects containing the player identifiers of the players being challenged.

message

A text message to display to the challenged players.

Discussion

This method should be used only to implement your own custom challenge user interface. You should only issue challenges when the local player directs you to do so.

If the achievement is marked as hidden in iTunes Connect, or if the challenged player has already earned the achievement and it is not marked as replayable, then the challenge is not issued.

Availability
  • Available in iOS 6.0 and later.
  • Deprecated in iOS 7.0.
Declared In
GKChallenge.h

reportAchievementWithCompletionHandler:

Reports the player’s progress to Game Center. (Deprecated in iOS 7.0.)

- (void)reportAchievementWithCompletionHandler:(void (^)(NSError *error))completionHandler
Parameters
completionHandler

A block to be called after the operation completes.

The block takes the following parameter:

error

If the operation was successful, this value is nil; otherwise, this parameter holds an object that describes the problem that occurred.

Discussion

When the player makes progress towards completing an achievement, your game communicates the player’s progress to Game Center by calling this method. An achievement object is implicitly tied to the local player that was authenticated when the object was created; your game should only report progress when the same local player is still authenticated on the device.

When the progress is successfully reported, the achievement is made visible if it was previously hidden. The percentComplete and lastReportedDate property values stored on Game Center are updated if the new percentComplete value is greater than the value previously stored on Game Center. if the value of the percentComplete property was equal to 100.0, then the achievement is marked as completed and a banner may be shown to the player.

When this method is called, it creates a new background task to handle the request. The method then returns control to your game. The background task automatically handles network errors, resending the data until the task completes. When the task is complete, Game Kit calls your completion handler. The completion handler is always called on the main thread.

Availability
  • Available in iOS 4.1 and later.
  • Deprecated in iOS 7.0.
Related Sample Code
Declared In
GKAchievement.h