Error while compiling the project with an Xcode 9.3

318 Views Asked by At

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.

2

There are 2 best solutions below

2
On

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:

enter image description here

3
On

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.