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.