我正在尝试将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。
更新:我添加了他们提到的所有框架。看我的screeshot。
Update2:现在它正在使用iPod Touch-5设备,但不能使用模拟器。我不知道,它是如何使用设备的。
答案 0 :(得分:3)
您似乎无意中将Security.framework
复制到了项目中,而不是仅仅从Framework搜索路径链接到它。
文件路径显示框架路径
/SampleApp/Security.framework/Security
检查.framework
文件的项目目录并将其删除。清洁+再次构建。请查看here以了解更多解决方法。
希望有所帮助!
答案 1 :(得分:1)
你错过了SystemConfiguration框架 - 尝试添加它,你应该好好去。
答案 2 :(得分:0)
它清楚地表明框架(Google gtl)不是为i386架构(模拟器)构建的。而是为框架构建(armv7和armv7s)。它不适用于模拟器。
如果你想在模拟器上运行,你应该得到谷歌gtl框架的模拟器版本。