6

dyld: Library not loaded: @loader_path/../Frameworks/GTL.framework/GTL Referenced from: /var/mobile/Containers/Bundle/Application/2EE31349-7221-47AF-83E7-7B172F5ED6AD/MyApp.app/MyApp Reason: image not found

I've tried adding GTL.framework to Embedded Binaries but this didn't help. Any idea what might be wrong. I created a workspace and followed the directions exactly as given in the tutorial: https://developers.google.com/google-apps/calendar/quickstart/ios

It's working fine on the simulator but gives me the above error when I try to run it on my device. Any ideas?

I'm running Xcode 7.2.1 and iOS 9.2

Edit

I've tried changing the installation path of the GTLiOSCore to @executable_path/../Frameworks but this doesn't fix anything.

Mihriban Minaz
  • 3,043
  • 2
  • 32
  • 52
Apollo
  • 8,874
  • 32
  • 104
  • 192
  • Possible duplicate of ["image not found" Error while using Custom FrameWork](http://stackoverflow.com/questions/20092886/image-not-found-error-while-using-custom-framework) – Eric Koleda Feb 03 '16 at 18:11
  • @EricKoleda Hi Eric, I tried the solution in that question but I still receive the error. Any other suggestions? Thanks so much. – Apollo Feb 03 '16 at 18:38
  • Sorry, that's my best guess. I'm still fairly new to iOS development. – Eric Koleda Feb 03 '16 at 19:13
  • @EricKoleda No worries, thanks. If you know anyone at Google who's worked on this API and could refer me, I would really appreciate it :) – Apollo Feb 03 '16 at 19:14
  • http://stackoverflow.com/questions/17703510/dyld-library-not-loaded-reason-image-not-loaded – Anil solanki Feb 05 '16 at 06:41
  • on this read all answers...http://stackoverflow.com/questions/26024100/dyld-library-not-loaded-rpath-libswiftcore-dylib – Anil solanki Feb 05 '16 at 06:42
  • @Anilsolanki can you point to which of those answers you think might help? For example, I don't think there's any Swift code in Google's library... – Apollo Feb 05 '16 at 22:13

3 Answers3

4

In GTLiOSCore target go to Build Settings and change Installation Directory to: @executable_path/Frameworks

You can also verify that your main project's Runpath Search Paths property contain @executable_path/Frameworks.

I've tried several other combinations, but for some reason The Dynamic Link Editor(dyld) is unable to find GTL.framework when the installation path contains /../.

Wiecek
  • 96
  • 3
3

Have you checked that your framework has been built for all architectures and not just the simulator?

Sample Build Settings Image

If that doesn't work you may need to create an aggregate target which includes target frameworks for both Simulator and devices.

See this link: Create iOS Universal Framework

1

I solved my own problem by changing Mach-O Type from Dynamic Library to Static Library in the Build Settings for GTLiOSCore (NOT the Build Settings for your app!).

enter image description here

Apollo
  • 8,874
  • 32
  • 104
  • 192