繁体   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