GeezerVison is showing github.com — fix(runtime): load iOS system frameworks from /System/iOSSupport on a Mac by edusperoni · Pull Request #551 · NativeScript/ios
Conversation
edusperoni
commented
Nov 10, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Supersedes #549.
Summary
An iOS app running on an Apple silicon Mac ("Designed for iPad") crashes at boot with ReferenceError: UIApplicationDidFinishLaunchingNotification is not defined (see #549 for the lldb evidence).
The root cause is the bundle path, not the lookup. On device builds SymbolLoader::resolveModule opens system frameworks from /System/Library/Frameworks. On a Mac, UIKit and the other iOS-only frameworks live under /System/iOSSupport/System/Library/Frameworks. The /System/Library path either has no bundle (Catalyst on macOS 15, which then falls back to dlsym(RTLD_DEFAULT)), or, on Designed for iPad, a bundle that resolves none of the iOS symbols.
This PR makes resolveModule try the iOSSupport bundle first when isMacCatalystApp / isiOSAppOnMac is true. Frameworks shared with macOS (Foundation, CoreGraphics, …) aren't under iOSSupport, so they fall back to /System/Library/Frameworks as before. The simulator and iOS device paths are unchanged.
Why not a dlsym(RTLD_DEFAULT) fallback (#549)
-
It picks up same-named symbols from unrelated images. In a Catalyst process I compared the module bundle lookup with the global dlsym for all 23,631 functions and variables in a real app's metadata. Every mismatch had the bundle returning the declaring framework and the global search returning something else:
- 293 OpenGLES
gl* functions → desktop OpenGL.framework/libGL.dylib
- 6 AddressBook constants →
PassKitCore; ReplayKit SCStreamErrorDomain → ScreenCaptureKit; plus a few more in zippered frameworks
OpenGLES and AddressBook are iOSSupport frameworks, so a fallback (and today's Catalyst behaviour) binds those calls to the wrong library.
-
It leaves the bad bundle in place for ensureModule. ensureModule runs on every method/property availability check while prototypes are built. A bundle that can't load is retried on each call: about 73 µs per attempt in a local measurement, plus an os_log_error line.
Verification
./run_tests.sh --temp-sim: 1864 specs, 0 failures, 11 skipped. The simulator build doesn't compile the new branch, so this covers the restructured bundle creation only.
SymbolLoader.mm compiles for iphoneos, Mac Catalyst and visionOS with -Werror=unguarded-availability(-new).
- Catalyst probe, all 271 iOS SDK frameworks:
- modules with no bundle: 78 → 37 (the remaining ones don't exist on macOS and still use the
dlsym fallback)
- no framework that loaded before fails to load now
- Catalyst probe, all 23,631 metadata functions/variables: 0 symbols that resolved before are lost with the new lookup.
- Not verified: a real "My Mac (Designed for iPad)" run. iOS-platform binaries can't be launched from a terminal, so that needs a check from someone with a Designed-for-iPad build (the fix(runtime): resolve system symbols when an iOS app runs on a Mac #549 repro app would do).
Summary by CodeRabbit
- Bug Fixes
- Improved system framework resolution on Mac Catalyst and supported iOS apps running on Mac, with a fallback to the existing lookup when the preferred location is unavailable.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
… Mac
On Mac Catalyst and for iOS apps running on Apple silicon Macs ("Designed
for iPad"), UIKit and the other iOS-only frameworks live under
/System/iOSSupport/System/Library/Frameworks. The loader always opened
system frameworks from /System/Library/Frameworks, which holds either no
bundle or one without the iOS symbols. On Designed for iPad that bundle
exists but resolves nothing, so UIKit constants such as
UIApplicationDidFinishLaunchingNotification came back undefined and
@nativescript/core failed at boot.
When running on a Mac, try the iOSSupport bundle first and fall back to
/System/Library/Frameworks for frameworks shared with macOS. Symbols stay
scoped to their declaring framework: a process-wide dlsym fallback would
bind same-named symbols from unrelated images (on Catalyst, OpenGLES gl*
functions resolve to desktop libGL and some AddressBook constants to
PassKitCore).
Supersedes #549.
coderabbitai
Bot
commented
Nov 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
SymbolLoader.mm detects Mac Catalyst and supported iOS apps running on a Mac. For system frameworks in those environments, it tries the iOS support framework path before using the existing base-URL lookup.
Changes: System framework lookup
| Layer / File(s) |
Summary |
Mac framework resolution NativeScript/runtime/SymbolLoader.mm |
Adds Mac environment detection and tries /System/iOSSupport/System/Library/Frameworks for system frameworks in those environments. If that lookup does not create a bundle, SymbolLoader uses the existing base-URL lookup. It creates a CFBundleSymbolResolver only when a bundle exists. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- NativeScript/ios#549: Addresses missing iOS system-framework symbols on a Mac using a
dlsym(RTLD_DEFAULT) fallback after a module resolver miss.
Suggested reviewers: darind
Merge Risk: Minimal · up to a3bce
-
No demonstrated issue blocks merging after normal checks. A run on “My Mac (Designed for iPad)” remains unverified.
Pre-merge checks: 5
-
| Check name |
Status |
Explanation |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
 |
The title clearly describes the main change: loading iOS system frameworks from /System/iOSSupport on a Mac. |
| Docstring Coverage |
 |
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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
-
A rabbit checks the framework trail, Where Mac-side paths can now prevail. It finds a bundle, then moves along, Or tries the base path if it’s gone. Its ears stand tall beside the code, Then hops away down the lookup road.
Recent review info
-
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
e3ffffa3-d158-4c88-9df2-176b817b02e9
Commits
-
Reviewing files that changed from the base of the PR and between 8856ee5 and a3bcec0.
Files selected for processing: 1
-
NativeScript/runtime/SymbolLoader.mm
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
|
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.
|