Skip to content

Add Swift Package Manager support for iOS and macOS - #195

Open
Shonu72 wants to merge 2 commits into
abner:masterfrom
ElvynForge:migrate-to-spm
Open

Add Swift Package Manager support for iOS and macOS#195
Shonu72 wants to merge 2 commits into
abner:masterfrom
ElvynForge:migrate-to-spm

Conversation

@Shonu72

@Shonu72 Shonu72 commented Sep 5, 2026

Copy link
Copy Markdown

Summary

Adds Swift Package Manager support for the flutter_js plugin, resolving #190.

This keeps the plugin compatible with Flutter's transition to SwiftPM while preserving existing CocoaPods support.

Changes

  • Added SwiftPM package manifests for iOS and macOS.
  • Moved Apple platform sources into the SwiftPM Sources/flutter_js structure.
  • Preserved the iOS Objective-C forwarding shim for CocoaPods compatibility.
  • Updated the iOS and macOS podspecs to use the new source paths.
  • Added SwiftPM build directories to .gitignore.
  • Removed obsolete empty Apple platform source/resource directories.

Validation

Tested with Flutter 3.47:

  • iOS build with SwiftPM enabled
  • macOS build with SwiftPM enabled
  • iOS build with SwiftPM disabled using CocoaPods
  • macOS build with SwiftPM disabled using CocoaPods
  • Both Package.swift manifests parse successfully
  • Both podspecs parse successfully
  • git diff --check passes

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.

1 participant