macosavfoundationxcode7dyld

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?


Solution

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