gpt4 book ai didi

ios - Google Play 游戏服务 iOS 在登录时崩溃

转载 作者:行者123 更新时间:2023-11-29 10:59:10 26 4
gpt4 key购买 nike

这是我第一次涉足 xcode 和 objective-c 的世界,所以请多多包涵。我一直在按照 google 开发者网站上列出的步骤在 ios 上实现 google play 游戏服务: https://developers.google.com/games/services/ios/quickstart

第 1-7 步工作正常,我可以使用 GPSignIn 对象登录 Google+:

Finished with auth. 2013-05-28 02:37:19.718 MyApp[2012:907] Success signing in to Google! Auth object is GTMOAuth2Authentication 0x1d56ab40: {accessToken="ya29.AHES6ZQa59aGdKmrWhKSN0ie_S_CqgLfBqKzlmHXU0Cpnxs", refreshToken="1/A8dCPhVKRRgbsM4Gcp4qlkhNJc9SyyTUEVssN3A-Iro", expirationDate="2013-05-28 10:37:19 +0000"}

一旦我实现了第 8 步,尽管我已经实现的 GPGManager 登录函数似乎发生了崩溃:

-(void)startGoogleGamesSignIn
{
// The GPPSignIn object has an auth token now. Pass it to the GPGManager.
[[GPGManager sharedInstance] signIn:[GPPSignIn sharedInstance]
reauthorizeHandler:^(BOOL requiresKeychainWipe, NSError *error) {
// If you hit this, auth has failed and you need to authenticate.
// Most likely you can refresh behind the scenes
if (requiresKeychainWipe) {
[[GPPSignIn sharedInstance] signOut];
}
[[GPPSignIn sharedInstance] authenticate];
}];
}

调试日志:

013-05-28 02:16:04.742 MyApp[1970:907] Printing the gppsignin instance = 2013-05-28 02:16:04.781 MyApp[1970:907] Printing the gpgmanager instance = 2013-05-28 02:16:04.785 MyApp[1970:907] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]' * First throw call stack: (0x3375d2a3 0x3b3db97f 0x336a734d 0x336a7a79 0x57089 0x56bf5 0x57f2d 0x37bd1 0x36331 0xb27f 0xb10b 0x2edcd 0x108d7 0x340986fd 0x33fd81f9 0x33fd8115 0x3343a45f 0x33439b43 0x33461fcb 0x336a374d 0x3346242b 0x333c603d 0x33732683 0x33731ee9 0x33730cb7 0x336a3ebd 0x336a3d49 0x372562eb 0x355b9301 0xab3d 0x3b812b20) libc++abi.dylib: terminate called throwing an exception (lldb)

据我所知,我没有在我的代码中使用任何 NSArray,而且我无法获得正确的调用堆栈。是否还有其他人遇到过类似的问题?

最佳答案

这是因为您忘记在您的 xcode 项目中添加 PlayGameServices.bundle,就像在 https://developers.google.com/games/services/ios/quickstart 上的入门指南中一样。

资料来源:我有同样的问题。

关于ios - Google Play 游戏服务 iOS 在登录时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16802039/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com