Skip to content
kenn edited this page Dec 29, 2010 · 5 revisions

Achievements

Offline Settings

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 the file by clicking "export to plist", and include the plist in "Resources" directory in your project.

Unlock achievements

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
}
Clone this wiki locally