Google Drive GTL framework, dyld: Library not loaded: #loader_path/../Frameworks/GTL.framework/GTL - ios

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:
Add "GTL.framework" to "Embedded Binary" in tab "General",
Add "GTL.framework" to "Linked Frameworks and Libraries" in tab "General",
Add "GTL.framework" to "Copy Files" in tab "Build Phrase",
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?
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.

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.
Make sure your Architecture setting in GTLiOSCore in GTLCore sub-project is correctly for iOS, but OSX for GTLOSXCore instead.
Change "Mach-O Type" to "Static Library" from "Dynamic Library"
After finishing the steps above, your Drive app may be run in your real devices.

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

Related

Unable to run my app on iOS 13. For a framework problem

I'm trying to test my project on my iPhone with iOS 13, using Xcode 12 beta 6.
The app crash on start and this is the message in the log:
dyld: launch, loading dependent libraries
DYLD_LIBRARY_PATH=/usr/lib/system/introspection
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib:/usr/lib/libMTLCapture.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
(lldb)
Someone can help me?
Thank you
This occurs because Xcode fails to sign the frameworks that are provided by SwiftPM with your app’s signing identity. It’s a known issue (SR-13343) in Xcode 12.
You can do these steps on third framework file to try fix :
select:Siging & Capabilites.
find : FrameWorks, Libraries, and Embedded Content.
change : the. "embed" of the third frameworks from "Do not Embed" to "Embed & Sign".
Go to Project Settings -> Target -> General -> Frameworks, Libraries, and Embedded Content -> Check that your custom framework has "Embed & Sign" option
add AppTrackingTransparency.framework to your project
In my case, I made a SPM framework and embedded then occurred this error.
I unchecked "Copy only when installing" in Build Phase of Embed Frameworks then works fine
you can also check this
Stripe iOS SDK via Swift Package Manager is installing, but crashing because "Library not loaded"
Don't Copy the Framework directly to your project. Adding 'Embed Pods Frameworks' manually works for me. Try It.
If you are asking permission for tracking via AppTrackingTransparency, you must addNSUserTrackingUsageDescription key to the info plist.

dyld: Library not loaded: #rpath .. reason: image not found

I am running into the above mentioned error on Xcode 10.2.1 and iOS 11 when adding my custom framework to an existing project.
I tried all the options mentioned in the previous questions asked related to this same error.
Always Embed Swift Binaries is set to yes, cleaned, removed derive data, reinstalled the certs.
Would anyone be able to help with this?
You need to also add your framework as Embedded Binary. Go to your target, select "General" tab and "Embedded Binaries" there.
Most of the times, you are using Apple (iOS) provided frameworks, that come as part of iOS and there is no need to do anything else, but define you're using them. That's the "Linked Framework and Libraries" part. When you use your own framework however, you need to embed it as part of your application and also add it to "Embed Binaries".

Error manually adding framework required by another framework

I'm trying to implement this wonderful framework: https://github.com/Yalantis/Koloda
The framework requires Facebook Pop, I don't like using cocoa pod so I added Pop manually, like this:
And I linked Pop to Koloda, Koloda to main project.
I succeeded running on simulator, but When I ran on iPhone, after the app launches, the compiler says:
dyld: Library not loaded: #rpath/pop.framework/pop
Referenced from:
/private/var/containers/Bundle/Application/9FC4B4D6-35AE-4233-9873-13905A64F725/Memory
Alarm.app/Frameworks/Koloda.framework/Koloda
Reason: image not found
Xcode 7.3.1. Base SDK 9.3 . I was able to compile and run project by manually adding Kolada and Facebook pop. I am not sure if you tried adding Kolada as Embedded project. (Available since ios8). Here are steps I followed:
Right click on my project to add "Kolada".
Right click on Kolada to add Facebook Pop.
2.1. Make sure Facebook Pop is added in General -->Linked Framework and Libraries.
2.2 And in Build Phases --> Add Copy Files Phase. Make destination as Framework and Add pop.framework here.
Add Kolada as Embedded project . Select your project Target . General --> Embedded Binaries.
Following questions might be helpful to you:
Reason: no suitable image found.
dyld: Library not loaded. Reason : no suitable image found
I am attaching screenshots.
Adding Kolada to Project
Once you've added pop to Koloda, you then can add the iOS framework for pop to Koloda, it should appear at the top of the list. Does the Koloda project compile?
Big thanks to #kamal and #JingJingTao for trying so hard to help me with this problem, I solved eventually with Cocoa Pods.
There seems to be some code signing issue with Xcode 7, which is marked out in Xcode 8, unfortunately I wasn't able to use Xcode 8 to build due to the other libraries need upgrade, this problem seem to be very common:
dyld: Library not loaded: #rpath/libswift_stdlib_core.dylib
Eventually, as #JingJingTao suggested, I had to try Cocoa Pods, and it worked, guess for now, it's the only solution.
Last thoughts, Cocoa Pods has an open community, people discuss and fix almost every issue you can encounter, while with Xcode, when you are freaking out with a problem, no one will tap on your shoulder and say: "Hey this is a bug and we will fix it later. " because, they are not open source.

Xcode 6 Interface Builder "cannot open compiled nibs" error, FiksuSDK

I have an app that runs great in Xcode 5, using CocoaPods.
When I open the app on Xcode 6 and hit build and run, I get four errors from the FiksuSDK about compiled nib files.
On the side, it states that I do not have permission to view it, but tapping on it shows the error: "The document "FMVerifyViewController.nib" could not be opened. Interface Builder cannot open compiled nibs." I don't directly call any of these nib files, however it's possible that the Facebook API does.
Screenshots attached.
I've tried removing the Pods directory, deleting derived data, updating pods and restarting Xcode. Nothing.
Any help would be really appreciated.
Screenshots:
Go to the "Build Settings" of your Project and set "Strip NIB Files" in "Interface Builder NIB Postprocessor - Options" to NO - worked quite well for me :)
This isn't a very good answer, but I had this same problem and in order to keep developing (until this gets figured out), I just removed those 4 nibs from the project. Just go to the project file, select the target you're building against, go to the "Build Phases" tab, and delete those 4 nibs from the "Copy Bundle Resources" section. Your project should build and run fine for the time being (I haven't encountered any negative effects to not having these nibs). By the way I think they're from the Fiksu SDK, not the Facebook SDK.
The error messages unfortunately are misleading because it's not a permissions problem and the nibs are valid. It appears that because they are provided as symlinks to the resource files, Xcode complains.
Fiksu just released a new version of their SDK where this issue is fixed. (look for version 4.3.1)"
Disclosure: I am a Fiksu Employee

Could not instantiate class named MKMapView

I may be doing something really stupid here as I've done it before and it worked and now...
Created a new iPad project, in the details view I added a MKMapView, added the MapKit.framework to the project, added the property / etc. to the header. Go to run the project and get a SIGABRT with
****Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate
class named MKMapView'**
I found http://mithin.in/2009/06/22/using-iphone-sdk-mapkit-framework-a-tutorial/ but, like I said, I've already added framework. What am I missing?
I ran into this too, but I was able to get past it by following the instructions of step 2 in your link (thanks, by the way):
Add the MapKit framework to the project. (Control + Click Frameworks
folder -> Add -> Existing Frameworks)
I just searched for MapKit.framework, added it to the project, and the error went away.
I haven't added any map code yet (although I do have a MapViewDelegate connected in IB), but it's working fine so far!
Click on your project to bring the project settings. Under Targets, click your project, select from the upper toolbar "Build Phases". Under "Link binary With Libraries" tab, you will see the list of frameworks included in your project. Click the "+" button and add MapKit library from the shown list to your project.
For Xcode 6.1:
Select your project
In general tab, look for Linked Frameworks and Libraries (last one)
Press + button
Search MapKit.framework
Finally add
Easy way!
Works above Xcode version 7.2
As far as I'm concerned selecting the MAPS from capabilities will automatically link your framework to your project all you have to do is check the Maps button in Capabilities -> Maps.
Heres the attached screenshot. Cheers!!
For xCode 4.2:
Click on your project name ->targets ->building Phase ->link binary with library
-> click on + sign ->select mapKit.framework ->click add
I noticed that I was getting this message (on top of the original one mentioned in this post) when I was building and running on the simulator:
ld: warning: ignoring file
/Users/peter/programming/iPhone/iNspector/MapKit.framework/MapKit,
file was built for unsupported file format which is not the
architecture being linked (i386)
Then I just connected my iPhone, build and ran on the device, and the map worked.
So it seems that the MapKit framework cannot be compiled on the 386 architecture, it needs the device.
In regards to #futureshocked's input, I also came across the
Id: warning: ignoring file /blah.../MapKit, file was built for unsupported file format which is not the architecture being linked (i386)
issue.
**Check to make sure you didn't copy the MapKit framework into your local project directory when you added it to your project. I accidentally did this and XCode was giving me the above error. So I removed it from my project directory (in Finder), recompiled, and everything was normal again.
If you don't have the Framework in your project, go ahead and re-link as stated in the answer above.
Found a good tutorial on getting started with MapKit:
http://www.youtube.com/watch?v=X-3jM24EIGM&feature=related
I also received this error when trying to deploy to my 5.1 phone (with XC 4.5), even after changing my deployment target to be 5.1. Looks like the maps update wouldn't fly since I still had Google Maps on my phone. After updating my phone's OS, the exception disappeared.
Please import the WebKit at your Build Phases.

Resources