Skip to content

feat: Add Swift Package Manager support - #126

Open
spydon wants to merge 2 commits into
mainfrom
feat/swift-package-manager
Open

feat: Add Swift Package Manager support#126
spydon wants to merge 2 commits into
mainfrom
feat/swift-package-manager

Conversation

@spydon

@spydon spydon commented Aug 14, 2026

Copy link
Copy Markdown
Member

Description

Adds Swift Package Manager support to gamepads_ios and gamepads_darwin, following the official Flutter plugin migration guide. This removes the hint emitted by flutter pub get on Flutter 3.44+:

The following plugins do not support Swift Package Manager for ios:
  - gamepads_ios
The following plugins do not support Swift Package Manager for macos:
  - gamepads_darwin

Changes per plugin:

  • Moved the Swift sources from Classes/ into the SPM layout (ios/gamepads_ios/Sources/gamepads_ios/ and macos/gamepads_darwin/Sources/gamepads_darwin/).
  • Added a Package.swift manifest with the GameController framework linked explicitly.
  • Updated the podspec source_files to the new path, so CocoaPods-based apps keep working unchanged.
  • Bumped podspec platform minimums to iOS 13.0 / macOS 10.15 to match the Flutter 3.35+ constraint already in the pubspecs (the old 11.0 / 10.11 values were below what Flutter supports).
  • Added .build/ and .swiftpm/ to the root .gitignore.

Checklist

  • The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #108

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Swift Package Manager support

1 participant