4

I have an app called Tripla which can sync data via Google Drive for iOS 8- devices. However, it got crash when synchronizing data on iOS 9 devices. Therefore, I tried to upgrade the Google frameworks by the latest library and follow the tutorial https://developers.google.com/drive/ios/quickstart.

This update, I got the error msg - dyld: Library not loaded: @loader_path/../Frameworks/GTL.framework/GTL ....... image not found when debugging on real devices.

After looking up many similar solutions such as:

  1. Add "GTL.framework" to "Embedded Binary" in tab "General",
  2. Add "GTL.framework" to "Linked Frameworks and Libraries" in tab "General",
  3. Add "GTL.framework" to "Copy Files" in tab "Build Phrase",
  4. Add dynamic path to "Runpath_Search_Path" in tab "Build Settings",

the issue was still not been solved.

Does anyone have the same issue and get solved?

error breakline error message

ps. Debugging on simulator is working well when clicking "Run" on Xcode. It, however, gets crash again on OS X 10.11.2 when clicking Icon on main screen in the simulator 9.1. crash on OS X

Exile3daime
  • 611
  • 6
  • 18

2 Answers2

11

Change dynamic library to static library

I solved this issue my own. It might be caught by wrong setting in the Google's dynamic linked framework. So that the app cannot run in real devices and find the dynamic library in runtime period. Please follow the tutorial Drive SDK for iOS and do more things.

  1. Make sure your Architecture setting in GTLiOSCore in GTLCore sub-project is correctly for iOS, but OSX for GTLOSXCore instead.

GTLFramework_iOS

  1. Change "Mach-O Type" to "Static Library" from "Dynamic Library" Static Library

After finishing the steps above, your Drive app may be run in your real devices.

Community
  • 1
  • 1
Exile3daime
  • 611
  • 6
  • 18
  • Hi Kueiapp, I did all your suggested changes but I still get the following error: dyld: Library not loaded: @loader_path/../Frameworks/GTL.framework/GTL Referenced from: /var/mobile/Containers/Bundle/Application/ID_of_MyApp.app/MyAppFolder Reason: image not found – iKK Feb 25 '16 at 23:44
  • Wow. This worked for the GMail API and Classroom API that I could not get working with Swift on XCode. Simply changing from dynamic to static was all that was needed. – gbotha Mar 02 '16 at 16:31
  • @skuenstler: sorry dude, it's the only way I've tried. Maybe someone could find out more. However, the error you mentioned is still dynamic library not found in runtime. You could also publish the error to Google API team. – Exile3daime Mar 04 '16 at 06:30
  • @Kueiapp, thanks for the thought! In the meantime, I went from Google-Drive to Dropbox. (since I only need an arbitrary cloud-drive). Dropbox has a much simpler implementation path for Swift, following this [link](https://github.com/dropbox/SwiftyDropbox) – iKK Mar 05 '16 at 11:00
  • This helped me, thanks. Xcode 7.3, Mac OS X 10.11.4 . – eugen Apr 07 '16 at 14:00
1

select TARGET -> General -> Embedded Binaries

click add button

select GTLCore->Products->GTL.framework iOS

click add button

Done

This work for me. Xcode 7.3 swift2.2

jimmy
  • 149
  • 1
  • 6
  • This worked for me. Reading other answers, didn't pick up on the GTLCore->Products->GTL.framework iOS option. Was mistakenly trying to embed the framework listed in my target project, not include from the source project. :-p – DaveDude Apr 16 '16 at 23:40