Note that there are some explanatory texts on larger screens.

plurals
  1. POGame Center Achievements and Cocos2d
    primarykey
    data
    text
    <p>I have a singleton class that handles all my game center stuff. I have set it to be a delegate of GKAchievementViewControllerDelegate.</p> <p>I call the following method showAchievements</p> <pre><code> - (void) showAchievements { GKAchievementViewController *achievements = [[GKAchievementViewController alloc] init]; if (achievements != nil) { achievements.achievementDelegate = self.delegate; [self.viewController presentModalViewController: achievements animated: YES]; } } </code></pre> <p>and I implement the following</p> <pre><code> - (void)achievementViewControllerDidFinish:(GKAchievementViewController *)achievements { [self.viewController dismissModalViewControllerAnimated: YES]; } </code></pre> <p>I set self.viewController with the following code before calling showAchievements</p> <pre><code> AppController* appDelegate = (AppController*)[[UIApplication sharedApplication] delegate]; [GameCenterManager instance].viewController = appDelegate.window.rootViewController; </code></pre> <p>The app crashes and the following shows up in the console log when I call showAchievements.</p> <pre><code>Jul 16 12:36:28 imac-3 myApp[17103] &lt;Info&gt;: 12:36:28.287698 com.apple.AVConference: GKSConnSettings: set server: { "gk-cdx" = "17.173.254.218:4398"; "gk-commnat-cohort" = "17.173.254.220:16386"; "gk-commnat-main0" = "17.173.254.219:16384"; "gk-commnat-main1" = "17.173.254.219:16385"; } </code></pre> <p>At the point where I call showAchievements the user has been logged in successfully.</p> <p>Any idea what I might be doing wrong here?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload