Skip to content

Add iOS platform support, enable App Group snapshot storage on Darwin, and constrain widget providers for iOS MVP#5

Open
waffensam wants to merge 1 commit intomainfrom
codex/convert-macos-app-to-ios-with-widget
Open

Add iOS platform support, enable App Group snapshot storage on Darwin, and constrain widget providers for iOS MVP#5
waffensam wants to merge 1 commit intomainfrom
codex/convert-macos-app-to-ios-with-widget

Conversation

@waffensam
Copy link
Copy Markdown
Owner

Motivation

  • Prepare the package and widget code to support an iOS companion app and Home Screen widgets.
  • Allow the widget snapshot persistence to use the App Group container on Darwin platforms (so iOS widgets/apps can share data).
  • Provide an iOS MVP that exposes a limited set of providers for widgets to simplify initial delivery.

Description

  • Add .iOS(.v17) to Package.swift platforms to enable building for iOS.
  • Change WidgetSnapshotStore.snapshotURL to use #if canImport(Darwin) so App Group container URLs are considered on Darwin platforms (including iOS).
  • Introduce WidgetProviderScope to limit available widget UsageProviders to .codex and .claude for iOS, and add fallbackProvider for safe fallback behavior.
  • Gate additional ProviderChoice cases and initialization with #if !os(iOS) so only the intended provider choices are exposed on iOS, and make supportedProviders(from:) fall back to WidgetProviderScope.fallbackProvider when none are supported.
  • Update CodexBarWidgetProvider logic and tests in Tests/CodexBarTests/CodexBarWidgetProviderTests.swift to reflect the iOS-limited provider set and platform-conditional expectations.
  • Add docs/IOS_MIGRATION.md documenting the phase-1 iOS migration plan and rationale.

Testing

  • Ran the unit test file Tests/CodexBarTests/CodexBarWidgetProviderTests.swift via swift test and the updated tests passed.
  • The adjusted provider selection behavior is covered by the updated tests which succeeded.

Codex Task

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant