I am trying to run a Swift app on my iPhone 4s. It works fine on the simulator, and my friend can successfully run it on his iPhone 4s. I have iOS 8 and the official release
I was having the same problem after moving to a new mac, and after hours, trying all the suggested answers in the questions, none of this worked for me.
The solution for me was installing this missing certificate. http://developer.apple.com/certificationauthority/AppleWWDRCA.cer
Found the answer here. https://stackoverflow.com/a/14495100/976628
Xcode 7.2, iOS 9.2 on one device, 9.0 on other. Both had the error. No idea what changed that caused it, but the solutions above for the WWDR were correct for me. Install that cert and problem solved.
https://forums.developer.apple.com/message/43547 https://forums.developer.apple.com/message/84846
In Xcode 8 the option for Embedded Content Contains Swift Code
option is no longer available.
It has been renamed to "Always Embed Swift Standard Libraries = YES"
For me none of the previous solutions worked. We discovered that there is an "Always Embed Swift Standard Libraries" flag in the Build Settings that needs to be set to YES. It was NO by default!
Build Settings > Always Embed Swift Standard Libraries
After setting this, clean the project before building again.
For keen readers some explanation The most important part is:
set the Embedded Content Contains Swift Code (EMBEDDED_CONTENT_CONTAINS_SWIFT) build setting to YES in your app as shown in Figure 2. This build setting, which specifies whether a target's product has embedded content with Swift code, tells Xcode to embed Swift standard libraries in your app when set to YES.
The flag was formerly called Embedded Content Contains Swift Code
You have to set the Runpath Search Paths
to @executable_path/Frameworks
as showed in the following screenshot of Build Settings:
If you have any embedded frameworks made in Swift, than you can set to YES
the Build Options Embedded Content Contains Swift Code
.
Let's project P is importing custom library L, then you must add L into
P -> Build Phases -> Embed Frameworks -> +
. That works for me.