簡體   English   中英

鏈接Google API iOS靜態庫

[英]Linking the Google API iOS Static Library

我正在嘗試將Google API鏈接到我的iOS應用程序中。 我已經從他們的網站上下載了google-api-objectivec-client ,並且正在按照第一個選項的說明來鏈接靜態庫(“鏈接到iOS靜態庫”)。

這是我的過程:

  • 將GTL.xcodeproj拖到我的工作區中。
  • 在我的主項目“ 構建階段”選項卡中,我在“ 目標相關性”下添加了GTLTouchStaticLib。
  • 然后,轉到“ 編譯源”選項卡,並添加了libGTLTouchStaticLib.a
  • 在“ 構建設置”下 ,我在“其他鏈接器標志”字段中添加了“ -ObjC-all_load”。

現在,在Google告訴您進行“其他鏈接器標記”更改之前,他們告訴您:

The static library target also creates a folder with the library's headers to drag into your target's sources. 
The headers folder is created in the build products directory. To find build products directory, in Xcode 4's Locations preferences pane, click the arrow for Derived Data.

因此,我繼續執行此操作,並且Header文件現在位於我的目標源中。 因此,我認為在繼續添加他們提供的任何服務之前,我應該對其進行編譯,並確保一切正常。 我的項目無法編譯,給出19個編譯器錯誤,其中包括:

Undefined symbols for architecture armv7:
  "_kSecValueData", referenced from:`-[GTMOAuth2Keychain setPassword:forService:accessibility:account:error:] in` libGTLTouchStaticLib.a(GTMOAuth2ViewControllerTouch.o)

所以很明顯這里出了問題。 有人有什么想法嗎? 我已經閱讀了一些文檔和許多其他堆棧問題,似乎每個人都有不同的想法和稍有不同的問題,我只是想不通。 干杯!

令人尷尬的是,我實際上並未在Google上看到部分錯誤代碼。 無論如何,我似乎沒有包含Security.framework和SystemConfiguration.framework。 以后可能還會請病假他們提出的另外兩個建議。 來源: https//groups.google.com/forum/#! msg / gtm- oauth2 / TVgSxG3129A / xcfsF9gmkgIJ

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM