GeezerVison is showing github.com — fix(metadata-generator): emit UIKit metadata for Mac Catalyst by farfromrefug · Pull Request #433 · NativeScript/ios
Conversation
farfromrefug
commented
Aug 11, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Two defects in build-step-metadata-generator.py stop a Mac Catalyst build from producing usable metadata. Both were found by building a real app for platform=macOS,variant=Mac Catalyst and fixing whatever failed next.
-
Generation crashes before it starts. With EFFECTIVE_PLATFORM_NAME=-maccatalyst the script looks up MACCATALYST_DEPLOYMENT_TARGET, which Xcode does not export unless the project sets it explicitly, so it dies with KeyError: 'MACCATALYST_DEPLOYMENT_TARGET'. It now falls back to IPHONEOS_DEPLOYMENT_TARGET.
-
The generated metadata contains no UIKit. UIKit and the other iOS-flavoured frameworks live under System/iOSSupport in the macOS SDK. Xcode passes those to the real compile with -iframework, which never reaches FRAMEWORK_SEARCH_PATHS, so the generator parses the macOS SDK with no UIKit in scope and emits metadata without it. Every UIKit class then fails at runtime with ReferenceError: UIDevice is not defined — the app dies during require() of the first module touching UIKit. Those two search paths are now added for -maccatalyst only.
Testing
Built a real app (OSS Weather) as a Mac Catalyst app on Apple Silicon. With both fixes it builds, signs and launches as a native macOS app — menu bar, resizable window, network and CoreLocation working.
Symbols in the generated Mac Catalyst metadata, before and after:
| symbol |
before |
after |
UIDevice |
0 |
2 |
UIContentSizeCategoryExtraSmall |
0 |
1 |
iOS device and simulator builds are unaffected — the new search paths are behind the -maccatalyst check, and the deployment-target change is a fallback that only fires when the platform-specific variable is absent.
Note for reviewers
The IS_UIKITFORMAC check in generate_metadata is dead code: Xcode's variable has been IS_MACCATALYST for several releases, so that branch never runs and the else branch builds arm64-apple-ios<sdk>-macabi, which is what actually works today. I left it alone rather than switch to an untested code path, but it is worth a follow-up.
Summary by CodeRabbit
- Bug Fixes
- Deployment metadata generation now uses a fallback deployment target when a platform-specific value is unavailable.
- macCatalyst builds can now locate iOS frameworks and subframeworks correctly.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Two things stopped Mac Catalyst builds from producing usable metadata:
- `MACCATALYST_DEPLOYMENT_TARGET` is not exported by Xcode unless the project
sets it explicitly, so the script died with `KeyError` before generating
anything. Fall back to `IPHONEOS_DEPLOYMENT_TARGET`.
- UIKit and the other iOS-flavoured frameworks live under `System/iOSSupport`
in the macOS SDK. Xcode passes those to the real compile with `-iframework`,
which never reaches `FRAMEWORK_SEARCH_PATHS`, so the generator parsed the
macOS SDK with no UIKit in scope and emitted metadata without it. Every UIKit
class then failed at runtime with `ReferenceError: UIDevice is not defined`.
Co-Authored-By: Claude Opus 5 <[email protected]>
coderabbitai
Bot
commented
Aug 11, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 19269f96-a249-4bb9-8707-02f83ba9280e
📥 Commits
Reviewing files that changed from the base of the PR and between bddaacb and 658f5b1.
📒 Files selected for processing (1)
metadata-generator/build-step-metadata-generator.py
📝 Walkthrough
Walkthrough
The build-step metadata generator now falls back to IPHONEOS_DEPLOYMENT_TARGET when a platform-specific deployment target is unavailable. macCatalyst builds now include iOSSupport framework and subframework directories in framework search paths.
Changes
Deployment metadata generation
| Layer / File(s) |
Summary |
Deployment target and framework path handling metadata-generator/build-step-metadata-generator.py |
The generator uses IPHONEOS_DEPLOYMENT_TARGET as a fallback and adds iOSSupport framework paths for macCatalyst builds. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Poem
A rabbit checked the build path twice,
Found fallback targets, neat and precise.
For Catalyst, paths now grow,
Through iOSSupport they safely flow.
Hop, hop—metadata is nice!
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name |
Status |
Explanation |
| Description Check |
✅ Passed |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
✅ Passed |
The title clearly identifies the metadata-generator fix for emitting UIKit metadata during Mac Catalyst builds. |
| Docstring Coverage |
✅ Passed |
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check |
✅ Passed |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
✅ Passed |
Check skipped because no linked issues were found for this pull request. |
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|