I've been trying to solve this issue for hours, and none of the online solutions seem to help.
Any time I run a swift app in the simulator, all is well. But when I try to depoly to a device, I get:
Console Output:
dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /var/mobile/Containers/Bundle/Application/5E3D4DDC-1CEF-455D-9687-FAA3D426D2EC/Test2.app/Test2 Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/5E3D4DDC-1CEF-455D-9687-FAA3D426D2EC/Test2.app/Frameworks/libswiftCore.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/5E3D4DDC-1CEF-455D-9687-FAA3D426D2EC/Test2.app/Frameworks/libswiftCore.dylib'
Crash Log Output:
dyld`dyld_fatal_error: -> 0x12002d088 <+0>: brk #0x3
- This happens with any of Xcode's templates, as long as the language is Swift
- I'm on OS X 10.11, Xcode 7.1, iOS 9.1, and have tried depolying to iPhone, iPad, and Apple TV
- This does not happen when the project is in Objective-C
Things I've tried to resolve this issue:
- Clean & Build
- Restart Xcode
- Restart El Capitan
- Set "Embedded Content Contains Swift" to YES (http://stackoverflow.com/questions/24002836/dyld-library-not-loaded-rpath-libswift-stdlib-core-dylib)
- Set Runpath Search Paths to @executable_path/Frameworks (http://stackoverflow.com/questions/24002836/dyld-library-not-loaded-rpath-libswift-stdlib-core-dylib)
- Revoking my developer certificate, and having Xcode regenerate it
- Revoking my developer certificate, and regenerating it myself in developer.apple.com (http://stackoverflow.com/questions/26024100/dyld-library-not-loaded-rpath-libswiftcore-dylib)
- Deleting all derived data, and Xcode caches
- Reinstalling the WWDR Certificate (https://forums.developer.apple.com/thread/15174)
- Deleting all keychain certificates, and reinstalling the ones I needed
On the verge of reinstalling my whole OS to try and fix this. Does anyone know how to solve this issue?
Kind Regards,
Chris