OStack程序员社区-中国程序员成长平台

标题: ios - 谷歌 gtl 框架集成在模拟器中出现错误但与设备一起使用 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 06:49
标题: ios - 谷歌 gtl 框架集成在模拟器中出现错误但与设备一起使用

我正在尝试将 Google gtl 框架与我的应用程序集成。但它给出了如下错误。

Ignoring file /Users/mani/Documents/Example/GooglePlusExample/SampleApp/Security.framework/Security, missing required architecture i386 in file /Users/mani/Documents/Example/GooglePlusExample/SampleApp/Security.framework/Security (2 slices)

 "_SecItemAdd", referenced from:


      -[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_SecItemCopyMatching", referenced from:


      -[GTMOAuth2Keychain passwordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_SecItemDelete", referenced from:


      -[GTMOAuth2Keychain removePasswordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_SecRandomCopyBytes", referenced from:


      -[GPPSignIn randomString] in GooglePlus(GPPSignIn.o)


  "_kSecAttrAccessible", referenced from:


      -[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly", referenced from:


      +[GTMOAuth2ViewControllerTouch saveParamsToKeychainForName:accessibility:authentication:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecAttrAccount", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecAttrGeneric", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecAttrService", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecClass", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecClassGenericPassword", referenced from:


      +[GTMOAuth2Keychain keychainQueryForService:account:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecMatchLimit", referenced from:


      -[GTMOAuth2Keychain passwordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecMatchLimitOne", referenced from:


      -[GTMOAuth2Keychain passwordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecRandomDefault", referenced from:


      -[GPPSignIn randomString] in GooglePlus(GPPSignIn.o)


  "_kSecReturnData", referenced from:


      -[GTMOAuth2Keychain passwordForService:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


  "_kSecValueData", referenced from:


      -[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in GoogleOpenSource(GTMOAuth2ViewControllerTouch.o)


ld: symbol(s) not found for architecture i386

但我已经正确地按照他们的指示进行了操作。添加了 Security.framework,并且 Other Linker Flags: -ObjC 已正确设置。我可以假设,有一个愚蠢的错误。但我查不出来。请帮我。

注意:我使用的是 xcode5.0。

更新:我已经添加了他们提到的所有框架。看我的截图。 enter image description here

更新 2: 现在它可以与 iPod Touch-5 设备一起使用,但不能与模拟器一起使用。我不知道,它是如何与设备一起工作的。



Best Answer-推荐答案


您似乎无意中将 Security.framework 复制到了您的项目中,而不是仅仅从框架搜索路径链接到它。

文件路径显示框架路径,

/SampleApp/Security.framework/Security

检查您的项目目录中的 .framework 文件并将其删除。再次清理 + 构建。检查 here 了解更多解决方法。

希望有帮助!

关于ios - 谷歌 gtl 框架集成在模拟器中出现错误但与设备一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22147400/






欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) Powered by Discuz! X3.4