ios - 适用于 iOS 的 Google Plus API : Share function - Crash app when touching "Public" in the native dialog share?

标签 ios google-plus

我在应用程序中使用 Google Plus API 来共享内容。 我使用这些行在我的应用程序中显示 native 共享对话框:

id<GPPNativeShareBuilder> shareBuilder = [[GPPShare sharedInstance] nativeShareDialog];

[shareBuilder setPrefillText:MY_TEXT];

[shareBuilder setURLToShare:[NSURL URLWithString:MY_URL];

[shareBuilder open];

对话框已成功显示。当我触摸“公开”以更改隐私时,应用程序立即崩溃。

我正在使用 XCode 5,我的 iPhone 是 iOS 5.0。 XCode 显示日志:

Uncaught exception: 

-[NSCache setObject:forKey:cost:]: attempt to insert nil value (key:acl_public_com.google.GPPCommonSharedResources)
Stack trace: (

0   CoreFoundation                      0x33e6f8d7 __exceptionPreprocess + 186

1   libobjc.A.dylib                     0x340bf1e5 objc_exception_throw + 32

2   CoreFoundation                      0x33e00cf5 +[NSObject copyWithZone:] + 0

3   CoreFoundation                      0x33e024a1 -[NSCache setObject:forKey:] + 44

4   MyApp                                0x002f86e5 +[UIImage(GPPAdditions) gpp_setCachedImage:forKey:] 

5   MyAPP                                0x002f8535 +[UIImage(GPPAdditions) gpp_imageNamed:bundle:] + 220

6   MyApp                                0x002f85df +[UIImage(GPPAdditions) gpp_imageNamed:tint:bundle:] + 13

请帮我解决这个问题。

最佳答案

这个问题的解决办法相当简单。不过我花了 3 天的时间来解决这个问题。在使用 google 的示例应用程序时,我发现我的应用程序的自定义 iOS 目标属性中缺少包名称。只需添加一个简单的行 ${PRODUCT_NAME} 就可以了:D

关于ios - 适用于 iOS 的 Google Plus API : Share function - Crash app when touching "Public" in the native dialog share?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19286115/

相关文章:

javascript - Google Plus 使用 Javascript 发帖?

ios - 如何在 ios swift2 中使用解析获取用于 google+ 登录的 session token

scope - openid 范围 "https://www.googleapis.com/auth/plus.me"会受到 Google+ 关闭的影响吗?

ios - Swift iOS - 如何让键盘在显示 SearchController 的同时显示自身?

ios - parentViewController 和presentingViewController 都为零

ios - 如何判断 Xcode 是否在目标中包含框架

ios - UITextView 滚动时 NSTimer 不触发

ios - 在没有Mac的情况下开发iOS应用

oauth-2.0 - Google+ 登录服务器端应用程序,将身份验证代码交换为访问 token

button - Google+ 分享按钮不起作用