Skip to content

Commit

Permalink
fix(ios): ignore duplicate and unnecessary framework search paths (#1…
Browse files Browse the repository at this point in the history
…2149)

Fixes TIMOB-28158
  • Loading branch information
build committed Oct 1, 2020
1 parent c4d90fe commit 35e4058
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
5 changes: 3 additions & 2 deletions iphone/cli/commands/_build.js
Expand Up @@ -42,7 +42,8 @@ const appc = require('node-appc'),
parallel = appc.async.parallel,
series = appc.async.series,
plist = require('simple-plist'),
version = appc.version;
version = appc.version,
merge = require('lodash.merge');
const platformsRegExp = new RegExp('^(' + ti.allPlatformNames.join('|') + ')$'); // eslint-disable-line security/detect-non-literal-regexp
const pemCertRegExp = /(^-----BEGIN CERTIFICATE-----)|(-----END CERTIFICATE-----.*$)|\n/g;

Expand Down Expand Up @@ -3255,7 +3256,7 @@ iOSBuilder.prototype.createXcodeProject = function createXcodeProject(next) {

// set the target-specific build settings
xobjs.XCConfigurationList[xobjs.PBXNativeTarget[mainTargetUuid].buildConfigurationList].buildConfigurations.forEach(function (buildConf) {
const bs = appc.util.mix(xobjs.XCBuildConfiguration[buildConf.value].buildSettings, buildSettings);
const bs = merge(xobjs.XCBuildConfiguration[buildConf.value].buildSettings, buildSettings);
delete bs['"CODE_SIGN_IDENTITY[sdk=iphoneos*]"'];

bs.PRODUCT_BUNDLE_IDENTIFIER = '"' + this.tiapp.id + '"';
Expand Down
7 changes: 6 additions & 1 deletion iphone/cli/hooks/frameworks.js
Expand Up @@ -533,7 +533,12 @@ class FrameworkIntegrator {
if (frameworkInfo.type === FRAMEWORK_TYPE_DYNAMIC) {
this.addEmbedFrameworkBuildPhase(frameworkInfo, fileRefUuid);
}
this.addFrameworkSearchPath(frameworkInfo.searchPath);
// Xcode has a special build phase step that handles XCFrameworks and
// extracts the correct .framework for an architecture. This works without
// consulting FRAMEWORK_SEARCH_PATHS so we don't need to modify it.
if (!frameworkInfo.isBinaryFramework) {
this.addFrameworkSearchPath(frameworkInfo.searchPath);
}
}

/**
Expand Down
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -101,6 +101,7 @@
"fs-extra": "^9.0.1",
"ioslib": "^1.7.21",
"liveview": "^1.5.4",
"lodash.merge": "^4.6.2",
"markdown": "0.5.0",
"moment": "^2.28.0",
"node-appc": "^1.1.1",
Expand Down

0 comments on commit 35e4058

Please sign in to comment.