Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib

I have just updated to Xcode 7 and swift 2 and finished fixing the errors that come with the transition. I finally got the project to build, but after the launch screen I get an error saying:

dyld: Library not loaded: @rpath/libswiftAVFoundation.dylib Referenced from: /var/mobile/Containers/Bundle/Application/...
Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/.../Frameworks/libswiftAVFoundation.dylib'

I have seen this error before but with other frameworks, and can't solve my issue. Is there a way to bypass this by adding my framework somewhere?

like image 718
coracora Avatar asked Sep 24 '15 22:09

coracora


3 Answers

Try to do clean, build and then run the project. Worked for me.

like image 158
mikebertiean Avatar answered Nov 17 '22 12:11

mikebertiean


In Xcode 8 updating the Build Setting

Always Embed Swift Standard Libraries to Yes

worked for me.

like image 54
JulianM Avatar answered Nov 17 '22 13:11

JulianM


None of the above solutions worked for me. In the end the problem was my signing certificate's trust settings. They were set to "Always Trust" which seemed to cause this issue. Switching it back "Use System Defaults" fixed it for me.

In my case I originally changed the certs trust settings because I had issues building remotely. I was able to fix both issues by switching the trust settings to "Use System Defaults" globally and "Always Allow" for SSL.

Hope this helps someone.

like image 29
desmond Avatar answered Nov 17 '22 13:11

desmond