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 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.