Objective-C Client Reference
Class PIOAchievements
Language: Objective-C
The Player.IO Achievements service
Properties | |||
---|---|---|---|
|
|||
|
|||
Methods | |||
- (PIOAchievement*) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
||
- (void) |
|
@property (nonatomic) NSArray * myAchievements
The list of all achievements; the values of Progress and ProgressGoal will indicate whether the achievement is started/pending/complete.
@property (nonatomic) OnComplete onComplete
Callback block called whenever an achievement is completed by a call to progressXXX.
getWithAchievementId:
This method gets the specified achievement.
Arguments
NSString* | achievementId |
Return Value
PIOAchievement* | The achievement, if found, otherwise nil |
loadWithuserIds:successBlock:
Load achievements for the specified users.
Arguments
NSArray* | userIds |
void(^)(NSDictionary*) | successBlock |
loadWithuserIds:successBlock:errorBlock:
Load achievements for the specified users asynchronously.
Arguments
NSArray* | userIds |
void(^)(NSDictionary*) | successBlock |
void(^)(PIOError*) | errorBlock |
progressAddWithAchievementId:progressDelta:successBlock:
Add or subtract from the current progress of an achievement synchronously.
Arguments
NSString* | achievementId |
int | progressDelta |
void(^)(PIOAchievement*) | successBlock |
progressAddWithAchievementId:progressDelta:successBlock:errorBlock:
Add or subtract from the current progress of an achievement asynchronously.
Arguments
NSString* | achievementId |
int | progressDelta |
void(^)(PIOAchievement*) | successBlock |
void(^)(PIOError*) | errorBlock |
progressCompleteWithAchievementId:successBlock:
Complete the specified achievement, by setting the progress to the maximum (ProgressGoal) of the achievement synchronously.
Arguments
NSString* | achievementId |
void(^)(PIOAchievement*) | successBlock |
progressCompleteWithAchievementId:successBlock:errorBlock:
Complete the specified achievement, by setting the progress to the maximum (ProgressGoal) of the achievement asynchronously.
Arguments
NSString* | achievementId |
void(^)(PIOAchievement*) | successBlock |
void(^)(PIOError*) | errorBlock |
progressMaxWithAchievementId:progress:successBlock:
Sets the current progress value to the bigger value of progress or the current value synchronously, i.e; newProgress = Max(currentProgress,progress)
Arguments
NSString* | achievementId |
int | progress |
void(^)(PIOAchievement*) | successBlock |
progressMaxWithAchievementId:progress:successBlock:errorBlock:
Sets the current progress value to the bigger value of progress or the current value asynchronously, i.e; newProgress = Max(currentProgress,progress)
Arguments
NSString* | achievementId |
int | progress |
void(^)(PIOAchievement*) | successBlock |
void(^)(PIOError*) | errorBlock |
progressSetWithAchievementId:progress:successBlock:
Sets the progress of the specified achievement synchronously.
Arguments
NSString* | achievementId |
int | progress |
void(^)(PIOAchievement*) | successBlock |
progressSetWithAchievementId:progress:successBlock:errorBlock:
Sets the progress of the specified achievement asynchronously.
Arguments
NSString* | achievementId |
int | progress |
void(^)(PIOAchievement*) | successBlock |
void(^)(PIOError*) | errorBlock |
refreshWithSuccessBlock:
Refreshes myAchievements synchronously Refreshes myAchievements asynchronously.
Arguments
void(^)() | successBlock |
refreshWithSuccessBlock:errorBlock:
Refreshes myAchievements asynchronously.
Arguments
void(^)() | successBlock |
void(^)(PIOError*) | errorBlock |