gpt4 book ai didi

ios - 链接 Google API iOS 静态库

转载 作者:行者123 更新时间:2023-11-29 13:08:50 25 4
gpt4 key购买 nike

我正在尝试将 Google API 链接到我的 iOS 应用程序中。我已经从他们的网站下载了 google-api-objectivec-client 并且我正在关注 first option instructions链接静态库(“链接到 iOS 静态库”)。

这是我的过程:

  • 将 GTL.xcodeproj 拖到我的工作区中。
  • 在我的主项目 Build Phases 选项卡中,我在 Target Dependancies 下添加了 GTLTouchStaticLib
  • 然后我转到编译源代码选项卡,我添加了 libGTLTouchStaticLib.a
  • Build Settings 下,我在 Other Linker Flags 字段中添加了“-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.

所以我继续这样做,头文件现在在我的目标源中。所以我想在我继续添加他们提供的任何服务之前,我应该编译它并确保一切正常。我的项目无法编译,出现 19 编译器错误,具体如下:

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

很明显这里出了问题。有人有什么想法吗?我已经阅读了一些文档和许多其他堆栈问题,似乎每个人都有不同的想法和略有不同的问题,我就是想不通。干杯!

最佳答案

令人尴尬的是,我实际上并没有用谷歌搜索错误代码的一部分。不管怎样,我似乎没有包括 Security.framework 和 SystemConfiguration.framework。我可能也需要他们稍后建议的另外两个。来源:https://groups.google.com/forum/#!msg/gtm-oauth2/TVgSxG3129A/xcfsF9gmkgIJ

关于ios - 链接 Google API iOS 静态库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17877767/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com