Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
193 views
in Technique[技术] by (71.8m points)

What does the "Embedded Content Contains Swift Code" build setting in Xcode 6 do?

It's a new setting under "Build Options". What does it do? I can't seem to find any documentation about it. My guess is this: Does it have to be set to YES in a mixed Objective-C/Swift app to tell Xcode to link against the Swift Runtime?

question from:https://stackoverflow.com/questions/24163870/what-does-the-embedded-content-contains-swift-code-build-setting-in-xcode-6-do

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It does not need to be Yes for linking. This setting is only for when you have a pure Objective-C target that depends on a mixed-source or pure Swift target.

Description:

Enable this setting to indicate that content embedded in a target's product contains Swift code, so that the standard Swift libraries can be included in the product.

Also in the release note of Beta 7:

The build step which embeds the Swift standard libraries in a bundle now only runs for application product types, and only if the application itself, independent of any embedded content, contains Swift source files. When building an application that itself does not contain Swift source files, but embeds other content like frameworks, XPC services, app extensions, etc. that do contain Swift code, you must set the build setting "Embedded Content Contains Swift Code" (EMBEDDED_CONTENT_CONTAINS_SWIFT). That way the Swift libraries will be included in the application.

Regards


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...