Skip to content

Library gap: SwiftUI [bdee903f] #121

Open

Description

@cristim

SwiftUI at /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI

Scan: 2026-09-23. Status: absent. 25 imported apps load this path; their executables import 2401 distinct nonweak symbols from it.
Recheck the current binary and prefix before coding. If this library is absent, its own dependencies cannot be known from this scan.

Apps needing it

  • Font Book — 1204 direct imports
  • Calculator — 955 direct imports
  • Tips — 772 direct imports
  • Freeform — 658 direct imports
  • System Settings — 595 direct imports
  • VoiceOver Utility — 478 direct imports
  • AppZapper 3000 — 466 direct imports
  • Screen Sharing — 459 direct imports
  • Print Center — 438 direct imports
  • Shortcuts — 378 direct imports
  • Preview — 362 direct imports
  • Notes — 350 direct imports
  • Contacts — 238 direct imports
  • Games — 214 direct imports
  • Photos — 185 direct imports
  • Passwords — 135 direct imports
  • System Information — 130 direct imports
  • Image Playground — 128 direct imports
  • Reminders — 124 direct imports
  • QuickTime Player — 34 direct imports
  • iPhone Mirroring — 23 direct imports
  • App Store — 18 direct imports
  • Magnifier — 11 direct imports
  • Mail — 6 direct imports
  • Music — 0 direct imports

Imported symbol sample

  • _$s10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV013EncapsulationB0OAA19AttributedStringKeyADMc
  • _$s10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV013EncapsulationB0ON
  • _$s10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV014UnderlineStyleB0OAA19AttributedStringKeyADMc
  • _$s10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV014UnderlineStyleB0ON
  • _$s10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV015ForegroundColorB0OAA19AttributedStringKeyADMc
  • _$s10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV015ForegroundColorB0ON
  • _$s10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV04FontB0OAA19AttributedStringKeyADMc
  • _$s10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV04FontB0ON
  • _$s10NSViewType7SwiftUI0A13RepresentablePTl
  • _$s11Coordinator7SwiftUI19NSViewRepresentablePTl
  • _$s11Coordinator7SwiftUI29NSViewControllerRepresentablePTl
  • _$s12CoreGraphics7CGFloatV7SwiftUI16VectorArithmeticADMc
  • _$s12TableRowBody7SwiftUI0aB7ContentPTl
  • _$s13TableRowValue7SwiftUI0aB7ContentPTl
  • _$s14AnimatableData7SwiftUI0A0PTl
  • _$s20NSViewControllerType7SwiftUI0aB13RepresentablePTl
  • _$s4Body7SwiftUI10LabelStylePTl
  • _$s4Body7SwiftUI11ButtonStylePTl
  • _$s4Body7SwiftUI12ViewModifierPTl
  • _$s4Body7SwiftUI13GroupBoxStylePTl
  • _$s4Body7SwiftUI14ToolbarContentPTl
  • _$s4Body7SwiftUI19LabeledContentStylePTl
  • _$s4Body7SwiftUI3AppPTl
  • _$s4Body7SwiftUI4ViewPTl
  • _$s4Body7SwiftUI5ScenePTl
  • …and 2376 more; regenerate the full list with the app scanner.

Source and implementation route

Start with upstream OpenSwiftUIProject/OpenSwiftUI and inspect its upstream OpenAttributeGraph dependency. Verify the exact Darwin module and ABI gaps. If Darling needs changes in either project, use a temporary fork under your own GitHub account and propose focused PRs to those upstream repositories; track switching the Darling pins after merge in #822.
Check the current Darling source and installed binary first. If a suitable open-source implementation exists, verify its license and API, create a temporary fork under your own GitHub account, make the required ABI and behavior fixes there, and open a focused pull request against the respective upstream repository. Pin the temporary fork for Darling integration only while the upstream fix is pending. After upstream merges the fix, switch the Darling pin to the upstream repository and record the merged PR and pin update in #822. If no suitable open-source implementation exists, implement a functional Darling slice from public API contracts and track required services.
Use the compatibility contribution guide for the build, AI-assisted investigation, tests, integration, and PR steps.

Acceptance

Provide a compatible arm64 load path and the required exports, run focused behavior tests under Darling, rescan the affected apps, exercise a real app workflow, and record any remaining indirect dependencies or runtime failures. Empty binding stubs do not satisfy this issue.

Activity

  1. cristim commented on Sep 23, 2026

    @cristim
    Author

    Verified on 2026-09-23: the current VibeDarling/darling-cocotron source declares and implements the CALayer properties contentsScale, contentsCenter, contentsFormat, allowsEdgeAntialiasing, and isOpaque. The saved Darling SDK snapshot used by the OpenSwiftUI module generator still has older QuartzCore headers. A Swift typecheck probe against that snapshot reports all five as missing; the same probe passes when its QuartzCore module is built from current Cocotron headers.

    cristim/OpenSwiftUI PR #3 adds an optional COCOTRON_ROOT source to the module generator. This is an import/build fix, not a SwiftUI.framework binary or app runtime result. Contributors can reproduce by generating a QuartzCore module from each header source, typechecking accesses to the five properties with the Darwin Swift frontend, then continuing the full OpenSwiftUI build against the current combined Darling SDK. The remaining SwiftUI ABI and indirect dependencies still need implementation and verification against AppZapper's imports.

  2. cristim commented on Sep 23, 2026

    @cristim
    Author

    2026-09-23 build update, verified against current source and binaries:

    • Built arm64 macOS Swift modules for OpenAttributeGraph and OpenAttributeGraphShims from the current fork (26 and 9 Swift files respectively).
    • Darling #812 adds the Darwin.os.lock Clang submodule needed by Observation. import Observation now typechecks against the patched SDK.
    • Cocotron #139 implements CoreText CTRunDelegate callback/refCon lifetime. Its guest runtime test passes in the combined prefix. Text layout metrics are still stubbed elsewhere in CoreText.
    • Foundation #50 exposes NS_SWIFT_SENDABLE; OpenSwiftUI fork #3 can now generate Clang modules from current Cocotron and Foundation headers. These resolve the earlier UIFoundation header errors. The older SDK snapshot had lacked NSAttributedStringKey and a visionOS availability macro already present in current source.
    • Forked MIT-licensed OpenCoreGraphics under cristim; both OpenCoreGraphicsShims and OpenQuartzCoreShims now compile as arm64 macOS Swift modules against the integration SDK.

    The combined OpenSwiftUI typecheck has moved from missing Darwin.os.lock, CTRunDelegate, and UIFoundation declarations to QuartzCore CADisplayLink in CoreAnimation_Private.h. Current Cocotron QuartzCore has no CADisplayLink declaration. The typecheck is still failing, and no SwiftUI binary or AppZapper launch is claimed.

    Next contribution: implement the needed CADisplayLink API and behavior in Cocotron QuartzCore (or verify a suitable OSS implementation), add a focused runtime test, rebuild the SwiftUI shim, and rerun the combined typecheck. Record each newly exposed gap rather than treating a successful header parse as a working SwiftUI framework.

  3. cristim commented on Sep 23, 2026

    @cristim
    Author

    Follow-up from the same combined typecheck: with OPENSWIFTUI_NO_CADISPLAYLINK=1 passed to Clang solely to expose later errors, the next missing module is OpenRenderBoxShims. I forked MIT-licensed OpenRenderBox. Its Darwin source module currently fails at two toolchain/header boundaries: the available Darling libc++ lacks standard <optional> (tracked in libc++ issue #784), and the OpenGL Clang module imports submodules inside an extern "C" region when CoreVideo is pulled in. Neither the diagnostic flag nor the fork alone provides a working RenderBox or SwiftUI runtime yet.

  4. cristim commented on Sep 23, 2026

    @cristim
    Author

    SwiftUI dependency progress (2026-09-23):

    • OpenRenderBox PR #30 compiles arm64 macOS OpenRenderBox and OpenRenderBoxShims modules with Darling's older libc++ headers. Its complete runtime library is still unbuilt.
    • Cocotron PR #140 adds named CoreGraphics color-space identity. The relinked Onyx2D/CoreGraphics guest test passes in the combined local prefix; P3/PQ conversion remains to implement.
    • OpenSwiftUI PR #3 now supports the current Cocotron OpenGL module shape and gates signpost code on os.signpost availability. Darling has an os C module, but no os.signpost Swift module.
    • Current swift-log source compiles an arm64 macOS Logging module using Darling's Swift overlay. OPENSWIFTUI_SWIFT_LOG permits the signpost fallback path.
    • Cocotron PR #141 declares CTAdaptiveImageProviding. A combined local CoreText header overlay with the pending CTRunDelegate PR #139 passes the previous CoreText_Private import failure.

    The temporary 881-source SwiftUI typecheck driver now reaches Swift source diagnostics, but it merges multiple SwiftPM targets into one module. Many missing-type and access diagnostics are artifacts of that driver. Next: build the actual targets with their dependency boundaries, implement QuartzCore CADisplayLink (the current OPENSWIFTUI_NO_CADISPLAYLINK flag is diagnostic only), then link and load a real SwiftUI framework in the combined Darling prefix. AppZapper still cannot run without it.

  5. cristim commented on Sep 23, 2026

    @cristim
    Author

    Target-aware build update: local OpenObservation and DarwinPrivateFrameworks forks are now available under cristim. OpenSwiftUI PR #3 and OpenAttributeGraph PR #242 add explicit opt-outs for Apple typed-allocation Clang flags unsupported by this Linux cross toolchain. darling-xnu PR #21 fixes the Clang 21/SDK stdatomic header guard collision; the focused arm64 atomic compile passes. With those fixes locally staged, OpenSwiftUI_SPI reaches a real Foundation API gap: NSAttributedString initWithFormat:options:locale:arguments:. Contribution details are in #813. The SwiftUI runtime and AppZapper launch remain open.

  6. cristim commented on Sep 23, 2026

    @cristim
    Author

    Current target-aware SwiftPM build update (2026-09-23):

    • Cocotron PR #142 implements the missing CADisplayLink API with run-loop scheduling. Its relinked QuartzCore passed a focused Darling guest test in the combined local prefix. The current timer fallback is nominal 60 Hz and is not synchronized to VBlank.
    • The build now reaches CAFilter +filterWithType: in OpenSwiftUI_SPI. Darling issue #814 tracks the required filter factory, constants, parameter handling, and rendering behavior.
    • The build still uses a temporary Foundation header-only declaration for NSAttributedString initWithFormat:options:locale:arguments: to expose downstream compile gaps. Issue #813 tracks its actual implementation. No SwiftUI binary or AppZapper runtime is working yet.

    The reproducible integration notes are in the installed-runtime report.

  7. cristim commented on Sep 23, 2026

    @cristim
    Author

    The target-aware OpenSwiftUI_SPI arm64 build advanced again. Foundation PR #51 implements the NSCalendar component:fromDate: and NSDateFormatter setLocalizedDateFormatFromTemplate: selectors used by TimeIntervalProvider.m. Its relinked Foundation passed a focused Darling guest test in the combined prefix, including localized rendering of Jul 19, 2024.

    The next compiler errors are in Localization.m: NSLocale.languageIdentifier is absent and the CoreFoundation umbrella import does not expose CFStringTokenizer types/functions. Temporary header-only declarations for the separately tracked attributed-string initializer and CAFilter factory remain in the diagnostic overlay. AppZapper still lacks a built SwiftUI runtime.

    See the updated integration report.

  8. cristim commented on Sep 23, 2026

    @cristim
    Author

    Target-aware arm64 OpenSwiftUI_SPI build update:

    The integration report has the current reproduction trail.

  9. cristim commented on Sep 23, 2026

    @cristim
    Author

    The target-aware arm64 OpenSwiftUI_SPI build advanced past DateProvider.m. Foundation PR #51 now includes NSDateFormatter.formattingContext/NSFormattingContext and maps context values to ICU through CoreFoundation's existing date formatter property. The combined Foundation dylib retains all 2,590 old exported symbol names. Its Darling guest test verifies copy/getter behavior and real French capitalization: Juillet at the beginning of a sentence versus juillet in the middle.

    The next two compile failures are Cocotron CALayer insertSublayer:atIndex: and AppKit NSColor colorWithCGColor:. I opened contributor-ready QuartzCore issue #816 and AppKit issue #815 with source pointers, expected behavior, guest test ideas, and AI-assisted contribution steps.

    The integration report has the build trail. Header-only diagnostic declarations for the separately tracked attributed-string formatter and CAFilter still need real implementations; SwiftUI and AppZapper are not yet running.

  10. cristim commented on Sep 23, 2026

    @cristim
    Author

    Two more target-aware OpenSwiftUI_SPI dependency gaps are addressed:

    • Cocotron PR #143 implements NSColor colorWithCGColor:. The combined AppKit retains the earlier Dictionary fixes and all 3,972 old exported symbol names. A Darling guest test verifies extended-sRGB and grayscale colors after releasing the original CGColor.
    • Cocotron PR #144 implements indexed CALayer insertion. The combined QuartzCore retains CADisplayLink PR App compatibility: Maps #142 and all 630 old exported symbol names. A Darling guest test covers ordering, moves, reparenting, removal, and invalid input.

    With both headers staged, the target-aware arm64 build passes the previous two errors and reaches OpenSwiftUICoreColor.m: NSColor colorWithColorSpace:components:count: and a dynamic UIKit-style initWithRed:green:blue:alpha: call. The next step is to determine the correct AppKit implementation versus OpenSwiftUI platform shim for each call, then test behavior. The separate attributed-string and CAFilter implementation gaps also remain. SwiftUI and AppZapper do not yet run.

    The integration report has the reproduction trail.

  11. cristim commented on Sep 23, 2026

    @cristim
    Author

    Current local integration update (2026-09-23):

    • Cocotron PR App compatibility: Messages #143 now adds both NSColor colorWithCGColor: and colorWithColorSpace:components:count:. The combined Darling guest passes the focused color test.
    • Cocotron PR App compatibility: Music #145 adds NSImage.alignmentRect. Its guest test passes with the Dictionary and color AppKit fixes staged together.
    • cristim/OpenSwiftUI PR libtrace: update submodule (level-specialized os_log entry points) #3 now uses a typed dynamic UIKit image bridge for its macOS overlay. The target-aware OpenSwiftUI_SPI build compiles OpenSwiftUICorePlatformImage.m against the new NSImage header.
    • The next observed compile blocker is missing CGPathCreateWithRoundedRect in Darling's CoreGraphics headers/implementation. The earlier Foundation attributed-string and CAFilter declarations are diagnostic overlays only and still require behavior.

    No SwiftUI.framework runtime or AppZapper launch is claimed yet. Reproduce the build using the target-aware command and local dependency sources documented in darling PR #119's installed-runtime report. Contributors using AI tools should cite the exact compiler error or guest trace, add a focused behavior test in the owning repo, stage the resulting binary into the combined local prefix, and rerun the build or app before opening a scoped PR.

  12. cristim commented on Sep 23, 2026

    @cristim
    Author

    Local integration update (2026-09-23): Cocotron PR #146 implements CGPathAddRoundedRect and CGPathCreateWithRoundedRect, replacing an empty add stub. The focused geometry test passes in the combined Darling guest; the relinked CoreGraphics retains all 649 prior exported names. The target-aware OpenSwiftUI_SPI build now compiles CGPath+OpenSwiftUI.m and stops in OpenSwiftUICoreViewFunctions.m on missing CALayer mask, affine-transform, filter, and shadow selectors. Darling issue #817 documents both the build errors and required renderer behavior for contributors. The Foundation attributed-string and CAFilter diagnostic declarations still need real implementations. SwiftUI.framework and AppZapper are not running yet.

  13. cristim commented on Sep 23, 2026

    @cristim
    Author

    Current dependency build update (2026-09-23): Cocotron PR #147 adds the CALayer affine-transform API and applies the stored layer transform in CARenderer; its conversion test passes in the combined Darling guest. The target-aware OpenSwiftUI_SPI build now passes that selector. With temporary declarations for the still-unimplemented CALayer mask/filter/shadow APIs, the entire SPI target compiles, but those declarations supply no runtime behavior. The deeper OpenSwiftUI target reaches OpenAttributeGraph; its existing PR #242 now lets the cross build select a real Swift source checkout, clearing missing swift/Runtime/Metadata.h. Subsequent host Swift standard-library and C++ <optional> failures remain. SwiftUI.framework and AppZapper still do not run; see darling PR #119's integration report for the exact build boundary.

  14. cristim commented on Sep 23, 2026

    @cristim
    Author

    Integration update (2026-09-23): Darling PR #818 fixes the SDK TARGET_OS_WASI definition; OpenAttributeGraph PR #243 fixes an older-libc++ std::countr_zero gap, and PR #242 selects the local Swift runtime headers. With host/Darwin Swift module paths separated in the local build and the existing OPENATTRIBUTEGRAPH_DARLING diagnostic define, arm64 macOS OpenAttributeGraph and OpenCombine core Swift modules are now produced. OpenSwiftUI fork PR #3 supports a local OpenCombine checkout and avoids importing QuartzCore's Objective-C umbrella from a C file. The next actual failure is OpenCombineFoundation: Darling's Swift Foundation overlay lacks NotificationCenter, OperationQueue, URL types, and related bridge semantics (issue #819). OpenCombine module compilation is not Apple Combine ABI compatibility; SwiftUI.framework and AppZapper remain unbuilt/unlaunched. Full commands, temporary diagnostic overlays, and relocated integration prefix are in darling PR #119's installed-runtime report.

  15. cristim commented on Sep 23, 2026

    @cristim
    Author

    Filed #840 for the CoreText font-descriptor symbolic-trait, feature/variation-copy, and stylistic-class gaps found while diagnosing the OpenSwiftUICore build. Three PRs against VibeDarling/darling-cocotron incoming.

  16. 16 remaining items

  17. cristim commented on Sep 23, 2026

    @cristim
    Author

    Tracking QuartzCore initializer/coding/misc Swift API gaps in #927.

  18. cristim commented on Sep 23, 2026

    @cristim
    Author

    Follow-up found while measuring QuartzCore fixes: #931 (CASpringAnimation properties and spring timing).

  19. cristim commented on Sep 24, 2026

    @cristim
    Author

    Linked: NSWorkspace URL opening gap found while working on #925 (see the new issue referencing #925).

  20. cristim commented on Sep 24, 2026

    @cristim
    Author

    Linked: #937 (NSWorkspace cannot open URLs).

  21. cristim commented on Sep 24, 2026

    @cristim
    Author

    Blocker for building OpenSwiftUI with OpenSwiftUIProject/OpenCombine 0.16.0: #943 (const os_unfair_lock_assert_* in libplatform).

  22. cristim commented on Sep 24, 2026

    @cristim
    Author

    Linked: #945 (CTFont and NSFont are not toll-free bridged on Darling).

  23. cristim commented on Sep 24, 2026

    @cristim
    Author

    Tracking the UTI overlay's private-shim dependency in #951.

  24. cristim commented on Sep 24, 2026

    @cristim
    Author

    Tracking URLResourceKey.contentTypeKey / URLResourceValues.contentType (OpenSwiftUI FoundationAdditions.swift:17) in #972.

  25. cristim commented on Sep 24, 2026

    @cristim
    Author

    Filed #974 (NSISO8601DateFormatter stub) and #973 (NSString path accessors imported as methods) for OpenSwiftUI Foundation gaps.

  26. cristim commented on Sep 24, 2026

    @cristim
    Author

    AppKit gaps from the OpenSwiftUI diagnostic, now tracked separately: #976 (AppKit overlay / SDK modules, NSApplicationMain argv), #977 (NSView designated initializers, frame: x5), #978 (NSControl.ControlSize.extraLarge). NSWorkspace.shared is #937.

  27. cristim commented on Sep 24, 2026

    @cristim
    Author

    Sub-issue: #980 (Date.ISO8601FormatStyle, 3 OpenSwiftUICore errors).

  28. cristim commented on Sep 24, 2026

    @cristim
    Author

    Tracking the SwiftUI.framework build (one module SwiftUI, library evolution, 413/466 AppZapper imports defined in a prototype) in #988.

  29. cristim commented on Sep 24, 2026

    @cristim
    Author

    OpenSwiftUI EnvironmentConfigurableFormatter.swift errors (DateComponentsFormatter.calendar, MeasurementFormatter.locale/numberFormatter): #975 (PR VibeDarling/darling-foundation#88) and #985 (PR VibeDarling/darling-foundation#90).

  30. cristim commented on Sep 24, 2026

    @cristim
    Author

    Follow-up for the OpenSwiftUI build: #997 (Foundation getters declared as methods, FileManager.default/UserDefaults.standard nullability).

  31. cristim commented on Sep 24, 2026

    @cristim
    Author

    AppKit status for the OpenSwiftUI diagnostic: with darling#993, darling-swift#94, darling-cocotron#217 #218 #219 #223 #224 and darling-foundation#93 on top of the integration branches, OpenSwiftUI's AppKit errors are gone (OpenSwiftUI module 33 -> 11 distinct, 10 -> 0 primary; total 93 -> 71). Remaining OpenSwiftUI errors are Foundation imports (NSNumber.doubleValue, Bundle info dictionaries) and AttributedString.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions