Skip to content

Remove or replace window_manager for Swift Package Manager compatibility #83

Closed

Description

@tilucasoli

Objective

Remove or replace the window_manager dependency so SuperDeck macOS apps can adopt Flutter's Swift Package Manager (SPM) plugin integration without falling back to CocoaPods.

Motivation

Flutter is moving to SPM as the default dependency manager for iOS and macOS (Flutter 3.44+). Plugins that only ship CocoaPods integration block full SPM migration and trigger fallback warnings during builds.

The window_manager package used by SuperDeck does not currently support SPM at the version resolved in this repo (0.4.3 in demo/pubspec.lock). SPM support was added upstream in window_manager 0.5.0, but we should still evaluate whether to keep the dependency or replace it with a lighter approach.

Current usage

window_manager is imported directly in the superdeck package:

  • packages/superdeck/lib/src/utils/app_initialization.dart — initializes window size (1280×720), aspect ratio (16:9), hidden title bar, show/focus on startup
  • Called from packages/superdeck/lib/src/ui/superdeck_app.dart via initializeDependencies()

The dependency appears transitively in desktop app lockfiles and macOS Podfile.lock files (e.g. demo/macos/Podfile.lock, packages/playground/macos/Podfile.lock), indicating CocoaPods-based macOS plugin integration.

Proposed directions

  1. Upgrade — Bump to window_manager ≥ 0.5.0 if SPM support is sufficient for our macOS targets and no other blockers remain.
  2. Replace with native setup — Configure window size, aspect ratio, and title bar style in platform runner code (MainFlutterWindow.swift on macOS, equivalents on Windows/Linux) and drop the plugin where possible.
  3. Alternative package — Evaluate another desktop window plugin with SPM support if runtime window control is still required from Dart.

Acceptance criteria

  • macOS demo/playground apps build with SPM enabled (flutter config --enable-swift-package-manager) without CocoaPods fallback caused by window_manager
  • Desktop presentation window behavior is preserved: 16:9 aspect ratio, 1280×720 default size, hidden title bar (macOS), show/focus on launch
  • Windows and Linux desktop targets continue to work if still supported
  • window_manager is removed from dependencies or explicitly justified if upgraded

References

Activity

  1. leoafarias commented on Sep 23, 2026

    @leoafarias
    Collaborator

    Update: window_manager no longer blocks Swift Package Manager. 0.5.2 ships macos/window_manager/Package.swift and already resolves through Flutter's generated SPM package.

    The actual CocoaPods fallback came from syntax_highlight → super_clipboard → super_native_extensions / irondash_engine_context, none of which support SPM in a published stable release. #126 vendors the highlighter to remove that chain and de-integrates CocoaPods from the demo and playground Apple projects, so this issue can close when #126 merges.

  2. leoafarias commented on Sep 23, 2026

    @leoafarias
    Collaborator

    Resolved by #126, which merged in stack #128: the syntax highlighter is vendored, so super_native_extensions and irondash_engine_context are gone, and CocoaPods is de-integrated from the demo and playground macOS apps and the demo iOS app. Every Apple plugin now resolves through Swift Package Manager.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions