Avatar ·

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

Hello everyone! I'm a beginner iOS developer, switching to Swift and Xcode 6 Beta. I created my first framework for sharing code between the app and an extension (Today Widget). Everything works fine in the simulator, but when I run on a real device (iPhone 5s, iOS 8 beta), the app crashes immediately after launch with the error: ``` dyld: Library not loaded: @rpath/MyFramework.framework/MyFramework Referenced from: /private/var/containers/Bundle/Application/.../MyApp.app/MyApp Reason: image not found ``` Here's how I set up the project: - In the main target (MyApp), I added the framework in the "Linked Frameworks and Libraries" section. - In Build Settings for the MyApp target, I set "Embedded Content Contains Swift Code" = YES. - The framework is in the same workspace, and the reference to it has been added.