Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Library Load with Google Calendar API - Obj C

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.

like image 663
Apollo Avatar asked Feb 03 '16 05:02

Apollo


3 Answers

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 /../.

like image 96
Wiecek Avatar answered Oct 14 '22 06:10

Wiecek


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

like image 27
Matthew Pearce Avatar answered Oct 14 '22 06:10

Matthew Pearce


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

like image 1
Apollo Avatar answered Oct 14 '22 07:10

Apollo