Library not loaded #rpath/AFNetworking iOS - ios

I've facing very strange issue while installing my app onto device using custom (my own created) framework.
MyFramework uses AFNetworking, Dropbox and Google drive from pods, and I just dragged MyFramework into my app and just build(which is fine) but on installation this give me error
dyld: Library not loaded: #rpath/AFNetworking.framework/AFNetworking
Referenced from: /private/var/containers.../MyFramework.framework/MyFramework
Reason: image not found
MyApp has nothing just new app and added MyFramework into Embedded Binaries.
I googled and found many many solution (mostly say that delete drive data or Clean build). Even this https://github.com/AFNetworking/AFNetworking/issues/3986 own issue in github AFNetworking library, tried but no remedy.

Maybe you can try to remove AFNetworking and install again, if you are using CocoaPods.

I found solution.
Find your Target --> Build Phases --> Add New Copy Files Phase -->Choose Destination Option,Frameworks --> Click add AFNetworking.framework --> Done.
Hope its useful.

Related

Error while compiling the project with an Xcode 9.3

I have a problem when I try to compile my project on real device. It says build succeeded and then I get the error below.
dyld: Library not loaded: #rpath/Agrume.framework/Agrume Referenced
from:
/var/containers/Bundle/Application/E3ABC8B5-A3C0-4FE3-B395-6A171C9E0EF6/myapp.app/myapp
Reason: image not found (lldb)
I tried to add the framework in the settings Build Phases/Build settings but it doesn't work.
You are probably not embedding the framework in your application.
Look at the General settings for your application target. There should be a section called "embedded binaries". Add your linked framework to that, and it should be OK. Here's an example:
I had the same issue and it was only fixed by rebuilding the used framework with newer swift version (4.0.3 -> 4.1). I had to download the library source and make a build myself.

Implement AdobeCreativeSDK in an iOS project - can't validate archive

I need to implement Aviary photo editing in my iOS project. For that you need to add the AdobeCreativeSDKCore.framework and AdobeCreativeSDKImage.framework. I tried following their guide here and I also tried via cocoapods.
Adding the frameworks manually
When I add the frameworks manually, everything works fine, but when I try to validate the archive or upload it to testflight I get many errors. I get this as long as the frameworks are imported no matter if I try to use them in code or not. You can see the errors in this screenshot:
Using Cocoapods
I add the 2 pods, install and then add the "strip frameworks" script provided in the frameworks (as per Adobe's instructions). Like this I can archive, validate and upload without a problem, but when I use them in code and run the app it crashes on launch with the following error:
dyld: Library not loaded: #rpath/AdobeCreativeSDKCore.framework/AdobeCreativeSDKCore
Referenced from: /Users/rado/Library/Developer/CoreSimulator/Devices/13E81DE6-83DE-4ABC-9AEE-C498D25D8F2C/data/Containers/Bundle/Application/829ACA06-8150-4745-82F7-1ED4F86884E7/CrowdGraf.app/CrowdGraf
Reason: image not found
(lldb)
I'm stuck on this for over a week now. Any ideas how to fix this?

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.

Carthage image not found Xcode 7 Carthage 0.8.0

Currently I'm using Carthage Dependency manager, and Everything works fine. Until I Run the code on my simulator. I get the following error message.
dyld: Library not loaded: #rpath/OAuthSwift.framework/OAuthSwift
Referenced from: /Users/eddwinpaz/Library/Developer/CoreSimulator/Devices/117C3ED9-5B0A-4FCD-B231-5E9BC0ADF821/data/Containers/Bundle/Application/1FC4FA99-7479-44D1-BB71-1A52404BDB4C/App.app/App
Reason: image not found
(lldb)
I've followed the steps on the following tutorial.
http://www.raywenderlich.com/109330/carthage-tutorial-getting-started
I must also mention that I installed manually the Carthage.pgk of Carthage and then removed it and install it via Brew.
There is something I'm forgetting to do?
There can be multiple causes. One cause can be that the framework is being linked with the framework but the framework is not being embedded in the app bundle. The compiler will happily link it for you but the dynamic loader will not find the framework’s image (i.e., binary) at launch.
To resolve this issue, select the project in the Project Navigator, select the app target in the list of targets, select the “Build Phases” tab, and add the framework in the “Embed Frameworks” list. If the framework is already in the list, the problem lies elsewhere.

dyld isuess (Library not loaded)

I have this message when I build my project:
dyld: Library not loaded:
#rpath/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient
Referenced from: /Users/dev01/mobile/ios/Test/test/testTests/FoneMonkey/bin/iphonesim
Reason: image not found
This is dynamic link error and as I understand correct this error came because image not found. is this correct?
What steps should be taken to resolve errors?
I have found this link and as I understad this error came because I use xcode 4.3. Now I have try this on 4.2 and everething work good.
But I not have any idea how to run it on XCode 4.3
Maybe you have this problem after adding new library and you linked it in actual framework path, if you drag this library in embeded framework path then problem will solve. Another variant is that in build scheme you have enabled memory managment malloc, if you turn it off problem will be solved.
Check your SDK project settings (i.e. when passing from SDK 6.x to 7.x) maybe one of library was not compiled for architecture and project target. And the paths. Clean DerivedData and delete app from simulator (if it is there).
If you still need the Sdk just copy it from Xcode 4.6.(3) both for device and simulator and see if this solve your problem.

Resources