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

fix(ios): fix watchOS targets that include frameworks #11708

Merged
merged 5 commits into from Jun 12, 2020

Conversation

hansemannn
Copy link
Collaborator

JIRA: https://jira.appcelerator.org/browse/TIMOB-27757

We are using this fix locally for around 4 months now but never had the chance to push the change. I added some inline comments to describe parts of these changes.

if (!currentFileRef.path.includes('extensions/') && currentFileRef.sourceTree === '"<group>"') {
xobjs.PBXFileReference[extFrameworkReference].path = `${ext.relPath}/${currentFileRef.path}`;
xobjs.PBXFileReference[extFrameworkReference].name = currentFileRef.path;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before, the build failed because the frameworks embedded into the targets would only have the relative path to the build directory, e.g. MyTarget/MyFramework.framework instead of the relative Titanium project path.

@@ -3430,7 +3436,7 @@ iOSBuilder.prototype.createXcodeProject = function createXcodeProject(next) {
});
}

const handledBuildPhases = [ 'PBXSourcesBuildPhase', 'PBXFrameworksBuildPhase', 'PBXResourcesBuildPhase', 'PBXCopyFilesBuildPhase' ];
const handledBuildPhases = [ 'PBXSourcesBuildPhase', 'PBXFrameworksBuildPhase', 'PBXResourcesBuildPhase', 'PBXCopyFilesBuildPhase', 'PBXShellScriptBuildPhase' ];
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PBXShellScriptBuildPhase wasn't handled so far, causing optional framework scripts to be skipped.

@@ -3643,8 +3654,6 @@ iOSBuilder.prototype.createXcodeProject = function createXcodeProject(next) {

if (legacySwift) {
extBuildSettings.EMBEDDED_CONTENT_CONTAINS_SWIFT = 'YES';
} else {
extBuildSettings.ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = 'YES';
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an old left over from the Swift 2 times. Nowadays, swift support us enabled by default and the build manages the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES flag on a module level.

@build build added this to the 9.1.0 milestone May 17, 2020
@build
Copy link
Contributor

build commented May 17, 2020

Messages
📖

💾 Here's the generated SDK zipfile.

📖 🎉 Another contribution from our awesome community member, hansemannn! Thanks again for helping us make Titanium SDK better. 👍
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖

✅ All tests are passing
Nice one! All 6669 tests are passing.
(There are 703 skipped tests not included in that total)

Generated by 🚫 dangerJS against 56c69a8

@ssekhri
Copy link

ssekhri commented Jun 12, 2020

FR Passed
Verified on:
Mac OS: 10.15.4
SDK: 9.1.0.v20200610071546
Appc CLI: 8.0.0
JDK: 11.0.6
Node: 10.17.0
Studio: 6.0.0.202005141803
Xcode: 11.4

@ssekhri ssekhri merged commit bd59e19 into tidev:master Jun 12, 2020
@hansemannn hansemannn deleted the TIMOB-27757 branch June 13, 2020 00:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants