GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(metadata-generator): emit UIKit metadata for Mac Catalyst by farfromrefug · Pull Request #433 · NativeScript/ios

Conversation

@farfromrefug

@farfromrefug farfromrefug commented Aug 11, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions
@farfromrefug @claude
fix(metadata-generator): emit UIKit metadata for Mac Catalyst
658f5b1
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

coderabbitai Bot commented Aug 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Review Change Stack

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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@farfromrefug
farfromrefug marked this pull request as ready for review August 11, 2026 08:58
edusperoni
edusperoni approved these changes Aug 11, 2026
View reviewed changes
@edusperoni
edusperoni merged commit 7291cf3 into NativeScript:main Aug 11, 2026
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@farfromrefug farfromrefug mentioned this pull request Aug 11, 2026
feat(catalyst): run and build Mac Catalyst apps with ns run catalyst NativeScript/nativescript-cli#6125
Open
1 of 5 tasks
@edusperoni edusperoni mentioned this pull request Oct 30, 2026
feat(runtime): V8 JIT on Mac Catalyst, with a Catalyst CI lane #533
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@edusperoni edusperoni edusperoni approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

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.

2 participants

@farfromrefug @edusperoni
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.