iosswiftframeworksdylddynamic-library

iOS app with framework crashed on device, dyld: Library not loaded, Xcode 6 Beta


This crash has been a blocking issue I used the following steps to reproduce the issue:

The app immediate crashed upon launching, here is console log:

dyld: Library not loaded: @rpath/FrameworkTest03.framework/FrameworkTest03
  Referenced from: /var/mobile/Applications/FA6BAAC8-1AAD-49B4-8326-F30F66458CB6/FrameworkTest03App.app/FrameworkTest03App
  Reason: image not found

I have tried to build on iOS 7.1 and 8.0 devices, they both have the same crash. However, I can build an app and run on the simulator fine. Also, I am aware that I can change the framework to form Required to Optional in Link Binary With Libraries, but it did not completely resolve the problem, the app crashed when I create an instance of Dog. The behavior is different on the device and simulator, I suspect that we can't distribute a framework for the device using a beta version of Xcode. Can anyone shed light on this?


Solution

  • In the target's General tab, there is an Embedded Binaries field. When you add the framework there the crash is resolved.

    Reference is here on Apple Developer Forums.