Skip to content

Add Swift Package Manager (SPM) Support - #45

Open
nasikhunamin wants to merge 1 commit into
bytepark:masterfrom
nasikhunamin:chore/spm-support
Open

Add Swift Package Manager (SPM) Support#45
nasikhunamin wants to merge 1 commit into
bytepark:masterfrom
nasikhunamin:chore/spm-support

Conversation

@nasikhunamin

Copy link
Copy Markdown

Add Swift Package Manager (SPM) Support

Summary

This package currently supports CocoaPods but cannot be integrated using Swift Package Manager (SPM). As Flutter is adding support for SPM on iOS, this prevents the package from being used in projects that have migrated away from CocoaPods.

Current Behavior

When building an iOS project with Swift Package Manager enabled, the package cannot be resolved or integrated because it does not provide the required Swift Package manifest (Package.swift) and SPM configuration.

Expected Behavior

The package should support Swift Package Manager by including:

  • A Package.swift manifest.
  • Proper target and product definitions.
  • Required third-party dependencies declared as Swift packages.
  • Source files organized in a structure compatible with SwiftPM.

Related Issue

#44

Motivation

Flutter has introduced Swift Package Manager support for iOS plugins, allowing projects to reduce or eliminate their dependency on CocoaPods. Adding SPM support would make this package compatible with modern Flutter iOS projects and improve the overall developer experience.

Possible Implementation

  • Add a Package.swift file.
  • Define the plugin target and library product.
  • Migrate CocoaPods dependencies to their Swift Package equivalents where available.
  • Verify that the package builds successfully with both Flutter's CocoaPods and Swift Package Manager workflows (if backward compatibility is desired).

Thank you for maintaining this package! I'd be happy to help test or contribute a pull request if needed.

GangemiLorenzo added a commit to GangemiLorenzo/auto_orientation that referenced this pull request Jul 15, 2026
- Add Package.swift manifest for SPM integration
- Move AutoOrientationPlugin.swift to SPM-compatible source layout
- Update podspec source paths and bump iOS deployment target to 12.0

Applies bytepark#45

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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