Skip to content

Fix macOS binary interface imports for NSHostingView #1190

Closed

Description

@Kyle-Ye

Summary

The OpenSwiftUI 0.24.0 binary package fails to compile on macOS when Swift loads its textual interface. The iOS Example works, but the macOS Example reports four methods that do not override a superclass method.

Reproduction

Use OpenSwiftUI-spm 0.24.0 and build its Example for My Mac with Xcode 26.6 (Swift 6.3.3). The failure also occurs when type-checking import OpenSwiftUI with a fresh module cache and textual interface loading.

Expected behavior

The binary package imports and the Example builds on macOS with the public SDK.

Actual behavior

The exported NSHostingView interface includes these overrides:

  • _recursiveSetDefaultKeyViewLoop()
  • designatedFocusRing()
  • _recursiveGatherAllKeyViewCandidates(in:)
  • _firstResponder(for:)

Their superclass declarations come from private AppKit headers used to build the framework. Those declarations are absent from the consumer's public SDK, so each override fails with method does not override any method from its superclass.

Acceptance criteria

  • Keep the native method implementations without exposing private AppKit overrides in textual interfaces.
  • Build the binary package Example successfully on macOS.
  • Extend the binary interface check to iOS, macOS, and visionOS, using the complete release XCFramework build.

Activity

  1. added this to the 0.24.1 milestone on Oct 18, 2026
  2. added
    platform: macOS
    type: bug
    area: hosting-bridge
    on Oct 18, 2026
  3. added
    type: build
    on Oct 18, 2026
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

    area: hosting-bridgeplatform: macOStype: bugtype: build

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions