Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIMOB-23313] (6_1_X) Disabled Swift settings for main Titanium project #8945

Merged
merged 1 commit into from
Apr 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 14 additions & 6 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2990,7 +2990,8 @@ iOSBuilder.prototype.createXcodeProject = function createXcodeProject(next) {
DEAD_CODE_STRIPPING: 'YES',
SDKROOT: 'iphoneos',
CODE_SIGN_ENTITLEMENTS: '"' + appName + '.entitlements"'
};
},
legacySwift = version.lt(this.xcodeEnv.version, '8.0.0');

// set additional build settings
if (this.target === 'simulator') {
Expand Down Expand Up @@ -3490,8 +3491,16 @@ iOSBuilder.prototype.createXcodeProject = function createXcodeProject(next) {
});
}

if (hasSwiftFiles && !extBuildSettings.SWIFT_VERSION) {
extBuildSettings.SWIFT_VERSION = '2.2';
if (hasSwiftFiles) {
if (!extBuildSettings.SWIFT_VERSION) {
extBuildSettings.SWIFT_VERSION = '2.2';
}

if (legacySwift) {
extBuildSettings.EMBEDDED_CONTENT_CONTAINS_SWIFT = 'YES';
} else {
extBuildSettings.ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = 'YES';
}
}
}, this);

Expand Down Expand Up @@ -3603,9 +3612,8 @@ iOSBuilder.prototype.createXcodeProject = function createXcodeProject(next) {
this.hasWatchApp = true;
}

var legacySwift = version.lt(this.xcodeEnv.version, '8.0.0');
Object.keys(xobjs.XCBuildConfiguration).forEach(function (key) {
var conf = xobjs.XCBuildConfiguration[key]
var conf = xobjs.XCBuildConfiguration[key];
if (!conf || typeof conf !== 'object' || !conf.buildSettings) {
return;
}
Expand Down Expand Up @@ -4777,7 +4785,7 @@ iOSBuilder.prototype.copyResources = function copyResources(next) {

// if we are using app thinning, then don't copy the image, instead mark the
// image to be injected into the asset catalog. Also, exclude images that are
// managed by their bundles.
// managed by their bundles.
} else if (useAppThinning && !relPath.match(bundleFileRegExp)) {
imageAssets[relPath] = info;
} else {
Expand Down
8 changes: 4 additions & 4 deletions iphone/iphone/Titanium.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2961,14 +2961,14 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 241EAEC5118E2BA90081A5BE /* project.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEVELOPMENT_TEAM = "";
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
EMBEDDED_CONTENT_CONTAINS_SWIFT = NO;
ENABLE_BITCODE = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_CPP_RTTI = NO;
Expand Down Expand Up @@ -2997,14 +2997,14 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 241EAEC5118E2BA90081A5BE /* project.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
DEVELOPMENT_TEAM = "";
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
EMBEDDED_CONTENT_CONTAINS_SWIFT = NO;
ENABLE_BITCODE = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Titanium_Prefix.pch;
Expand Down