Skip to content

Add a SwiftUI-friendly presentation API #36

Description

@HituziANDO

Problem

Current built-in presentation APIs require UIKit or AppKit view-controller types and static calls. SwiftUI clients need presentation state that can be bound to a view hierarchy without searching for a global window.

Scope

  • Provide a SwiftUI-facing adapter for structured update results.
  • Expose presentation state suitable for alert, sheet, or a documented view modifier.
  • Support iOS and macOS within their existing deployment targets where SwiftUI APIs permit.
  • Do not introduce global window lookup.
  • Add a minimal SwiftUI usage example while retaining the UIKit/AppKit APIs.

Dependencies

Acceptance criteria

  • A SwiftUI application can check and present an update without creating a view controller.
  • Presentation is scoped to the view or scene that owns the adapter.
  • Optional and required update actions are represented correctly.
  • The adapter remains testable without presenting system UI.

Tests

  • Cover state transitions, dismissal, repeated results, scene ownership, and action routing.

Relevant files

  • Framework/Sources/
  • README.md
  • iOSSample/
  • MacSample/

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions