I tried to include the Google-Api in my iOS-App. Wanted to include Google Drive.
So I followed everything on https://developers.google.com/drive/ios/quickstart .
After many hours of try-and-error it's not working at all.
It starts that the whole thing doesn't seem to be 64bit-capable and XCode will complain ...didn't contain all required architectures...". After fiddling around with different build settings I got that out of my way.
Than the howto advices only to copy two files (GTLDrive.h
and GTLDrive_Sources.m
) into your project. This results in the complaint GTLDriveConstants.h
would be missing. In the end you have to copy the whole Drive/Generated
folder into your project. After that it still complained GTLQuery.h
would be missing, so I imported all the header-files (yes, I set the "User Header Search Paths" to the source-folder of the Google-API, doesn't help).
Next build will produce a lot of "duplicate symbol"s. After a lot of searching and finding out I had to clean up the "Compile Sources" in "Build Phases". Now that problem was solved, but now I'm stuck.
Now it complains:
clang: error: no such file or directory: '/Users/#myself#/Library/Developer/Xcode/DerivedData/#my-project#-finogpkkwtusudgbuiiodrxfuxwm/Build/Products/Debug-iphonesimulator/libGTLTouchStaticLib.a'
I got libGTLTouchStaticLib.a added to the application project's Build Phases "Link Binary with Libraries" list like adviced in the howto.
I got no more ideas. Anybody?
BTW: What a pain-in-the-ass! Dropbox-integration was so easy; import the framework - go! Dropbox 1, Google -1.000.000
Yes i feel your pain :D . GD is a pain to integrate. I had faced the same problem this is how i solved it.
Before the below steps make sure you build the GTL.xcodeproject that you have added to your xcode project. once or you wont fine the library
Go To Xcode> File Menu > Project Setting
Click on the arrow near Derived Data
In the derived data folder search for the GTL project
then go to Build->Products->Debug-iphonesimulator or -iphoneos
you will find libGTLTouchStaticLib.a
Use this in your project!
Phew !!! Let me know if this works for you.
I faced the same problem when I tried to build for devices. Here is how I fixed it.
Click on the GTL.xcodeproject and go to build settings. Check if the Architectures is set to "Standard architectures (armv7, armv7S, arm64)".
Hope this helped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With