fix(ios): support module builds with mac=true on Catalyst#14391
fix(ios): support module builds with mac=true on Catalyst#14391macCesar wants to merge 2 commits intotidev:mainfrom
Conversation
|
This is awesome! The code looks good, but I would want it to be tested. I'm not quite able to test it yet. |
|
when I create a new module with the PR SDK, keep everything as it is and then run the build commandwill fail with setting |
|
Hey Michael! Thanks for testing this. I think the symlinks in the Mac Catalyst slice of Could you check two things?
The maccatalyst slice uses a versioned macOS framework structure ( I'm also looking into changing the build destination to produce a flat framework structure that wouldn't need symlinks at all, which would fix the root cause instead of patching it. |
|
the folder only contains der "Versions" folder, no symlinks. I've took the SDK from the workflow action and ran will test a local build over the weekend |
Replaces the build_titaniumkit.sh symlink fix with a runtime approach that matches how _build.js handles it for app builds. When the SDK is installed via `ti sdk install` (ZIP extraction), the Mac Catalyst slice symlinks get lost. This restores them before the xcodebuild step so module builds with mac=true work regardless of how the SDK was installed. Also forwards --sdk to internal ti create/build commands so the test app uses the same SDK version the module was built with. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Hey Michael, thanks for that output, it confirmed the issue. The The problem is that I pushed a fix in Also removed the previous Can you pull the latest and test again when you get a chance? |
|
Thanks for testing, Michael! Glad it worked on your end too. And yeah, good call on the Hopefully this can get merged soon! |

Summary
This PR fixes iOS module builds when
manifestincludesmac: truefor Mac Catalyst support.It addresses 3 required areas:
TitaniumKit.xcframeworkMac Catalyst slice keeps expected framework symlinks.mac: trueis set.Changes
1) TitaniumKit packaging
support/iphone/build_titaniumkit.shxcodebuild -create-xcframework, restore symlinks in:ios-arm64_x86_64-maccatalyst/<Framework>.framework2) Module templates
iphone/templates/module/objc/template/ios/{{ModuleName}}.xcodeproj/project.pbxproj.ejsiphone/templates/module/swift/template/ios/{{ModuleName}}.xcodeproj/project.pbxproj.ejsAdded in iOS build configurations:
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"SUPPORTS_MACCATALYST = YES3) Build-time auto-fix for existing modules
iphone/cli/commands/_buildModule.jsensureMacCatalystBuildSettings():manifest.mac === 'true'project.pbxprojwith:SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"SUPPORTS_MACCATALYST = YESAlso improved module build diagnostics and SDK consistency:
ticommand exit code and full command.--sdk <version>to staged temp app create/build when provided.Validation
Validated locally by building SDK and module with this branch:
npm run cleanbuild -- iosti build -p ios --build-only --sdk 13.2.0on a module withmac: trueResult: