我正在测试一个在游戏中心运行的应用程序。当应用程序从图标启动时,如果应用程序是从游戏中心启动(无论是从游戏中心应用程序还是作为 friend 邀请的目标),我想避免出现一个序言。我正在检查我的 appDelegate 中的 launchOptions,如下所示;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSLog(@"%sThe launch options are %@", __PRETTY_FUNCTION__, launchOptions);
if (launchOptions != nil) {
[[KYTGlobals instance] setQuickStart:YES];
}
...
当应用程序由 Game Center 启动时效果很好,但当它由 friend 邀请步行启动时,启动选项变量为 NIL;
在配置门户中,我已为开发启用推送通知,但未为生产启用推送通知。
有什么线索吗?
最佳答案
我决定将其提交给 Apple 支持,但不幸的是,答案是该功能不受支持,因为这需要 UIKit 对 GameKit 有一定的了解,从而导致跨框架依赖。我被要求将其作为错误提交。
关于iphone - 如何检测我的应用程序已从游戏中心推送通知启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11634665/