3

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?

Julian
  • 9,299
  • 5
  • 48
  • 65
onuryilmaz
  • 378
  • 1
  • 4
  • 9

3 Answers3

4

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.

Steve Bazyl
  • 11,002
  • 3
  • 21
  • 24
  • Yes i think you are right about that it was related to targets, i checked target settings from the sample Dredit project, applied to my project the same target membership settings and its working fine now. – onuryilmaz Feb 01 '13 at 21:52
3

click on build phases-> compile sources now add GTLDRIVE_Sources.m and viewcontrolller.m files

it's worked for me

PRASAD1240
  • 81
  • 3
0

Better to Use Google Drive Using pod. Here is the Offical Document of Google Drive Rest API

This is Example Library You can Use this for understanding

GoogleDriveBrowser

Shourob Datta
  • 1,886
  • 22
  • 30