Google Drive SDK iOS示例 [英] Google Drive SDK iOS Example

查看:387
本文介绍了Google Drive SDK iOS示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照iOS中的示例教程中的步骤来操作Google Drive sdk;
https://developers.google.com/drive/ios/quickstart



我认为我所做的所有步骤与教程和视频中描述的相同,但请不断收到Apple Mach-0链接程序错误,其中包含详细信息,



架构i386的未定义符号:
_OBJC_CLASS _ $ _ GTLDriveFile,引用自:
ViewController.o中的objc-class-ref
_OBJC_CLASS_ $ _GTLQueryDrive,引用自:
ViewController.o中的objc-class-ref
_OBJC_CLASS _ $ _ GTLServiceDrive,引用自:
ViewController.o中的objc-class-ref
_OBJC_CLASS _ $ _ GTLUploadParameters,引用自:
ViewController.o中的objc-class-ref
_OBJC_CLASS _ $ _ GTMOAuth2ViewControllerTouch,引用自:
ViewController.o中的objc-class-ref
_kGTLAuthScopeDriveFile,引用自:
- ViewContr中的[ViewController createAuthController] oller.o
ld:找不到体系结构的符号i386
clang:错误:linker命令失败,退出代码1(使用-v查看调用)

我认为这些与在13:45视频中发生的错误类似,我无法弄清楚我在哪里出错,有什么想法?

解决方案

看起来像是在步骤3.8中引起的。添加云端硬盘服务文件时,您还需要确保所有目标都已选中。当我重试它时,我注意到只有* Tests目标被默认选中,所以在构建应用程序时这些文件不会被编译。在上一步骤中.xib文件可能会发生类似的情况。



因此,在步骤3.7& 3.8,请务必在添加到目标列表中选择复制项目...选项以及两个目标。



让我知道如果修复它适合你,我会更新快速启动,以更具体一些。


I follow the steps in the iOS example tutorial of google drive sdk which is in; https://developers.google.com/drive/ios/quickstart

i think i am making all the steps same as described in tutorial and video, but keep receiving Apple Mach-0 Linker Error which have the details as,

Undefined symbols for architecture i386: "_OBJC_CLASS_$_GTLDriveFile", referenced from: objc-class-ref in ViewController.o "_OBJC_CLASS_$_GTLQueryDrive", referenced from: objc-class-ref in ViewController.o "_OBJC_CLASS_$_GTLServiceDrive", referenced from: objc-class-ref in ViewController.o "_OBJC_CLASS_$_GTLUploadParameters", referenced from: objc-class-ref in ViewController.o "_OBJC_CLASS_$_GTMOAuth2ViewControllerTouch", referenced from: objc-class-ref in ViewController.o "_kGTLAuthScopeDriveFile", referenced from: -[ViewController createAuthController] in ViewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

I think these are similar to the errors occured in the video at 13:45

I cant figure out where i have the mistake, any ideas?

解决方案

Looks like that was caused at step 3.8. When adding the Drive service files, you also need to make sure that all the targets are selected. When I retried it I noticed that only the *Tests target was selected by default so those files aren't compile in when building the app. A similar thing can happen with the .xib file in the previous step.

So in steps 3.7 & 3.8, make sure to select both the "Copy items..." option as well both targets in the "Add to targets" list.

Let me know if that fixes it for you and I'll update the quickstart to be a little more specific.

这篇关于Google Drive SDK iOS示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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