Error while compiling the project with an Xcode 9.3 - ios

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.

Related

Xcode Library included but not found?

I'm working with Wikitude AR and on running their out-of-the-box example I'm running into an error.
Error:
dyld`dyld_fatal_error:
-> 0x12008d088 <+0>: brk #0x3
Output:
dyld: Library not loaded: #rpath/WikitudeNativeSDK.framework/WikitudeNativeSDK
Referenced from: /var/containers/Bundle/Application/F826D5F6-554F-4CFA-B3DA-D3522636E93A/unityexample.app/unityexample
Reason: image not found
Here's a screen of the included library: I've also tried re-adding it
So why is this framework not found?
Already tried: library linked but Xcode says "file not found."
Xcode 7.3.1 | OS X 10.11.4
Solution
In newer versions of Xcode / iOS you need to do the additional step of adding the framework as an Embedded Binary
https://stackoverflow.com/a/28469804/332578
Can you please try enabling the following:
If that doesn't work then best will to go through the example app supplied by the framework provider or check the documentation page aginan. It seems they have lot of dependancy frameworks to be added for it to work:
http://www.wikitude.com/developer/documentation/ios
This may work:
Delete the framework by right click show in finder
Do a clean build Cmd+Shift+K
Then create a new build.
Which XCode version are you using?

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.

AppCode run iOS simulator "Library not loaded"

I was trying AppCode 3.1. I had a iOS 8.1 project with XCode 6.1.1 with one one linked framework. The framework is SwifteriOS.framework build with Carthage (https://github.com/Carthage/Carthage) like this:
github "mattdonnelly/Swifter" == 1.4.1
Everything in XCode works fine, but when I tried to start the project in simulator with AppCode, the console gives me:
/Users/daiwei/Library/Caches/appCode31/DerivedData/Avetuc-36d98cf8/Build/Products/Debug-iphonesimulator/Avetuc.app
Simulator session started with process 17951
Debugger attached to process 17951
dyld: Library not loaded: #rpath/SwifteriOS.framework/SwifteriOS
Referenced from: /Users/daiwei/Library/Developer/CoreSimulator/Devices/C325D5F4-DDCF-41C5-9F7D-6CC17F175DA4/data/Containers/Bundle/Application/AB30E0FB-7A0F-4914-B6EB-B02B26CB5741/Avetuc.app/Avetuc
Reason: image not found
Exception: EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0))
I can see the simulator launching and showing the launch screen of the app. But app just crash with above message.
image not found usually refers to the framework's binary not being loaded, usually because it's not actually ever copied over to the app's binary.
It could be that Xcode is properly copying over the framework for you, while AppCode doesn't have the instructions to do so. Make sure to follow the Run Script phase instructions (https://github.com/Carthage/Carthage#if-youre-building-for-ios) so that you know for sure that the frameworks will make it over. Also, ensure that the library shows up in "Linked Frameworks and Libraries" as well.

dyld: Library not loaded: #rpath/MyDSK.framework/MyDSK -> SWIFT iOS 8.0

I'm currently develop an swift SDK.
When compile the sample with the swift SDK, I got an error
dyld: Library not loaded: #rpath/MyDSK.framework/ODBlockChainWallet
Referenced from: /Users/{}/Sample.app/Sample
Reason: image not found
And if I go on the referenced folder, I can see the swift SDK T_T
Any idea?
I was having this problem and was able to fix it by adding the Swift framework (MySDK.framework) to the "Embedded Binaries" section of the "General" tab of the Xcode project settings. Then deleting the derived data and rebuilding.
Maybe you forgot to add the Copy Files Build Phase in your projects targets with "Framework" as destination
LOP_Luke's solution only half did it for me. After I added my embedded frameworks to the "Embedded Binaries" in the General tab, I had to go to "Build Settings" and check "Embedded Content Contains Swift Code" to YES.
By default it is set to NO.
Followed by cleaning and building. Enjoy!
The following has worked for me:
"Embedded Content Contains Swift Code" to YES
Clean
Rebuild
(I suspect, although I cannot prove, that it's really the Clean that fixes this.)

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