Reputation: 951
When I run a build with the simulator it crashes with this error, saying 'dyld: Library not loaded' and also 'image not found';
dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /Users/username/Library/Developer/CoreSimulator/Devices/105F223C-3558-46E2-B3C0-CEF7E29B6B3D/data/Containers/Bundle/Application/D0F33E52-59FC-46EA-B1FF-DBE191CA4DD2/Watch.app/PlugIns/Watch Extension.appex/Watch Extension
Is this a simulator error, or an app code error? I would like to know if I can upload the app to the App store, or would it be an invalid build because of this error?
Also, any ideas on how I can fix it?
Upvotes: 1
Views: 571
Reputation: 17239
You cannot upload to the App Store this way, though I don't know why you would want to since you can't test your app.
Go to your main application and try turning on Always Embed Swift Standard Libraries
(this was called Embedded Content Contains Swift
in earlier releases).
Sometimes if the main app target doesn't have any Swift code or you have a plugin situation Xcode doesn't realize it should be including the Swift standard library in your bundle. In this case, for whatever reason, Xcode doesn't think Watch.app
needs Swift so it doesn't include it even though your extension does use Swift.
Upvotes: 2