When you enable the framework created using Swift in a project other than Swift, you must copy the standard Swift libraries to the final output. Xcode has a checkbox for this (# 4 in the original question), but apparently there is an error where in some cases this does not actually happen.
I saw somewhere another thread that said this happens when you have a structure built using Swift that is built for several architectures like armv7 and arm64. (See section here .)
In any case, the solution is to add them all manually. The files you are looking for are in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos .
I have done this:
Step 1. Open Terminal and enter this by copying the libraries to the new swiftStdLib folder in your home directory.
cd /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos mkdir ~/swiftStdLib cp libswift*.dylib ~/swiftStdLib
Step 2. Inside Xcode, go to General β Embedded binaries and click + to add. Click Add another , then go to the / swiftStdLib home folder. Highlight everything and press enter.
Step 3. Clean and create a project.
Hope this helps someone.
source share