-
Notifications
You must be signed in to change notification settings - Fork 0
Achievements
Achievements are usually managed at the server side, but you can also unlock achievements offline.
Sign in to http://pankia.com, go to "Basic Information", download a file named PNOfflineSettings.plist
by clicking "export to plist", and include the plist in "Resources" directory in your project.
To unlock an achievement, call +[PankiaNet unlockAchievement:]
.
-(void)unlockSomeAchievement:(id)sender
{
[PankiaNet unlockAchievement:@"10"]; // Unlock the achievement with ID of "10"
}
When an achievement is unlocked, a notification bar will show up at the top of the screen. By tapping the bar, dashboard comes in and the user can see the details of the achievement.
If you don't want the notification bar to open up the dashboard, define -(BOOL)shouldLaunchDashboardWithAchievementsView
in your delegate.
- (BOOL)shouldLaunchDashboardWithAchievementsView
{
return NO; // dashboard won't show up when the notification bar is tapped
}
Also if you want to stop showing the notification bar, define -(BOOL)shouldShowNotification
in your delegate.
- (BOOL)shouldShowNotification
{
return NO; // don't show the notification bar
}