- Home /
Game center doesn't appear.
I used a button to show the game center in my iOS project.When pressing the button, it will call Social.ShowAchievementsUI() to display the game center. At first, it works well. But if I press home button and then go back to my app and press the button, game center doesn't appear. Could anyone tell me why this happened and how to solve this problem? Thanks.
I have this issue too. And i found this log meesage on XCode
Warning: Attempt to present on which is already presenting
Help!!
Searching google tells me something about Some UI View Table which is loaded so an attempt to load another one is not going to work and you have to use the old one.
Answer by i16yue · Aug 08, 2015 at 12:32 PM
I found a way to fix the bug. In the xcode project - UnityAppController
In: applicationDidBecomeActive delete if(_snapshotview) {.....}
In: applicationWillResignActive delete last few lines _snapshotView = [self createsnapshotView]; if (_snapshotView) {....}
I don't know why the unity needs to create the snap view itself. With these codes, the view hierachy changed, but the gamecenter view controller is still cached in the rootViewController.presentedViewController. While you try to present again it won't work as loged in xcode.
Thanks very mush,i16yue. After using your method, the Game Center doesn't disappear any more! Hope Unity will fix this issue in next version.
I was having the same problem with the sharing interface. Thanks for the tip!