2014-03-03 13 views
2

我試圖將谷歌gtl framwork與我的應用程序集成。但它給錯誤如下。谷歌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 

但我按照他們的指示正確。新增了安全框架,也正確設置了Other Linker Flags: -ObjC。我可以假設,有一個愚蠢的錯誤。但我找不到。請幫幫我。

注:我使用xcode5.0。

更新:我加他們會提到的所有框架。看我的screeshot。 enter image description here

UPDATE2:現在,它的工作與iPod touch-5器件,但不能與仿真工作。我不知道,它如何與設備一起工作。

+0

http://stackoverflow.com/a/18080078/2522603 ...檢查here..it是次要的錯誤...希望這會幫助ü... – ChenSmile

+0

@Immi你能告訴那個小的失誤?該鏈接指向我的YouTube視頻。 – Mani

+0

雅請通過視頻,我看到這個視頻之前,我面臨很多錯誤我解決了所有。我敢肯定,你也一樣。請檢查您所遵循的所有步驟。如有任何問題,請隨時提供給我。我在那裏回答你... – ChenSmile

回答

3

你似乎已經無意複製Security.framework到您的項目,而不是僅僅從框架搜索路徑鏈接到它。

文件路徑顯示的框架路徑,

/SampleApp/Security.framework/Security 

檢查你的項目目錄.framework文件並將其刪除。再次清理+構建。請檢查here以瞭解更多的解決方法。

希望有幫助!

+1

哇人。你找到了。問題已修復。我已經刪除了securtiy.framework我的項目和項目目錄。BuildSetting - > Build階段 - >與libs鏈接的二進制 - >添加安全框架。感謝阿馬爾:) – Mani

+0

但不知道爲什麼它與設備一起工作,爲什麼不用模擬器? – Mani

+0

@Mani不知道確切的原因,但是你的項目的FRAMEWORK_SEARCH_PATHS設置會被搞亂。 – Amar

1

你錯過了SystemConfiguration框架 - 嘗試添加,你應該很好去。

+0

沒有人。我也加了這個。用screeshot查看我更新的問題。 – Mani

+0

你有沒有嘗試做一個乾淨的重建,也許重置模擬器? –

+0

雅我也試過。你有沒有看到更新的問題?它正在使用設備,但不能與模擬器一起使用。你有沒有看到這個「錯誤的第一行文件中缺少所需架構i386」? – Mani

0

它清楚地表明,該框架(谷歌GTL)爲i386架構(模擬器)未建。相反的框架是專爲設備架構(ARMv7的和armv7s)。它不會在模擬器中工作。

如果你想在模擬器上運行,你應該得到谷歌GTL框架的模擬器版本。

+0

「i386 architecture」是什麼意思?模擬器有什麼特別的架構? – Mani

+0

是的,請參閱http://stackoverflow.com/questions/7874519/ios-simulator-on-mac-is-running-i386-architecture-not-armv7 – Barani

+0

好的。但我無法接受這條線'它不會在模擬器中工作'。我做了一些RnD並讓你知道。 – Mani

相關問題