0

ゲームに Game Center を実装しようとしていますが、問題があります。

ここに私のMain.csコードがあります:

namespace iosgame
{       
    public class Application
    {
        [Register ("AppDelegate")]
        public partial class AppDelegate : IOSApplication {

            MainViewController mainViewController;

            public AppDelegate(): base(new Game(new StaticsDatabase(),new StoreDatabase(),new InappPurchase(),new Social(),new MissionsDatabase()), getConfig()) {

            }

            internal static IOSApplicationConfiguration getConfig() {
                IOSApplicationConfiguration config = new IOSApplicationConfiguration();
                config.orientationLandscape = true;
                config.orientationPortrait = false;
                config.useAccelerometer = false;
                config.useMonotouchOpenTK = true;
                config.useObjectAL = true;
                return config;
            }

            //
            // This method is invoked when the application has loaded and is ready to run. In this 
            // method you should instantiate the window, load the UI into it and then make the window
            // visible.
            //
            // You have 17 seconds to return from this method, or iOS will terminate your application.
            //
            public override bool FinishedLaunching (UIApplication app, NSDictionary options)
            {
                base.FinishedLaunching(app,options);
                UIViewController controller = ((IOSApplication)Gdx.app).getUIViewController();
                mainViewController = new MainViewController();
                controller.View.Add(mainViewController.View);



                return true;
            }

            private bool isGameCenterAPIAvailable()
            {
                return UIDevice.CurrentDevice.CheckSystemVersion (4, 1);
            }
        }

        static void Main (string[] args)
        {
            UIApplication.Main (args, null, "AppDelegate");
        }
    }
}

そして、これが Main.cs のスーパークラスです: https://github.com/libgdx/libgdx/blob/master/backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplication.java

このhttps://github.com/xamarin/monotouch-samples/blob/master/GameCenterSample/GameCenterSample/MainViewController.csの例を使用しようとしていますが、ゲームに認証ウィンドウが表示されません。おかえり、名前」の通知が表示されますが、gamecenter アプリからログアウトしてゲームを再度開いた後、認証ウィンドウが表示されません。

どうすれば修正できますか?

前もって感謝します

4

1 に答える 1