添加谷歌的Objective-C API“GTL”到iPhone项目 [英] Adding Google Objective-C API 'GTL' to iPhone project

查看:180
本文介绍了添加谷歌的Objective-C API“GTL”到iPhone项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何将谷歌云端硬盘API添加到我的iPhone项目,我可以用它?

How to I add the Google Drive API to my iPhone project to I can use it?

到目前为止,我已经拖了GTL项目到我当前的应用程序的项目(因此它在我的应用程序的项目嵌套)。然后,在我的应用程序的目标的构建阶段,我加GTL.framework,然后加入GTL.framework到我的(见附件图)与库链接二进制。这引发以下错误:

So far, I have dragged the GTL project into my current app project (so that it is nested under my app project). Then, under my app target's build phases, I added GTL.framework, and then added GTL.framework to my 'Link binary with Libraries' (see attached pic). This throws the following error:

clang: error: no such file or directory: '/Users/xxx/Library/Developer/Xcode/DerivedData/Golf-hfbczyaemhyzgvbrtgdxqnlzeuaa/Build/Products/Debug-iphonesimulator/GTL/GTL'

如何解决这个问题?

How to I fix this?

推荐答案

我与此错误消息挣扎也是如此。这是我如何解决它:

I struggled with this error message as well. This is how I solved it:

请确保您已经添加了您正在使用下的服务文件夹GTLSource /通用/(例如,增加对Google云端硬盘驱动器文件夹)。

Make sure you have added the folder for the service that you are using under GTLSource/Common/ (e.g., add the Drive folder for GoogleDrive).

在GTL.x codeproj(您已经添加到您的工作空间)找到GTLSource文件夹并将其拖动到您的主项目(在你的案件高尔夫)。完成!

Under GTL.xcodeproj (that you have already added to your workspace) find the GTLSource folder and drag it to your main project (Golf in your case). Done!

现在,你可以删除对已添加到工作区中的GTL.x codeproj引用。

Now you can remove references to the GTL.xcodeproj that you have added to the workspace.

通过这种方法,你甚至都不需要添加库(所以如果你已经添加了它们链接库列表中删除它们)。

With this approach, you don't even need to add the libraries (so remove them from the list of linked libraries if you have added them).

在谷歌API文档没有像苹果的文档(这不是好)。

The Google API documentation is nothing like Apple's documentation (it's not good).

我还要提到的是我建立的iOS和MacOSX的不是一个应用程序,但这应该为OSX正常工作。

I should also mention that I'm building an app for iOS and not MacOSX, but this should work for OSX as well.

这篇关于添加谷歌的Objective-C API“GTL”到iPhone项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆