Skip to content

feat: add Swift Package Manager support#516

Merged
hyochan merged 1 commit intofeat/6.0.0-major-refactoringfrom
feat/swift-package-manager-support
Aug 2, 2025
Merged

feat: add Swift Package Manager support#516
hyochan merged 1 commit intofeat/6.0.0-major-refactoringfrom
feat/swift-package-manager-support

Conversation

@hyochan
Copy link
Copy Markdown
Owner

@hyochan hyochan commented Aug 2, 2025

Summary

  • Add Swift Package Manager (SPM) support alongside existing CocoaPods support
  • Create Package.swift configuration for SPM
  • Maintain backward compatibility with CocoaPods

Changes

  • Added Package.swift file with proper SPM configuration
  • Updated pubspec.yaml to include sharedDarwinSource: true for iOS platform
  • Created darwin/ directory structure for shared iOS/macOS code
  • Modified podspec to avoid file duplication issues

Context

As mentioned in the issue #506, Flutter is moving towards Swift Package Manager support since CocoaPods is transitioning to read-only mode. This PR adds SPM support while maintaining full backward compatibility with existing CocoaPods users.

Test plan

  • Tested with CocoaPods - pod install works correctly
  • Verified no duplicate file errors during build
  • Test with Swift Package Manager enabled projects
  • Verify example app builds and runs correctly

Closes #506

- Add Package.swift for SPM configuration
- Update pubspec.yaml with sharedDarwinSource flag
- Create darwin directory structure for shared iOS/macOS code
- Maintain backward compatibility with CocoaPods
@hyochan hyochan changed the base branch from main to feat/6.0.0-major-refactoring August 2, 2025 02:11
@hyochan hyochan added the feature label Aug 2, 2025
@hyochan hyochan merged commit ed0baf9 into feat/6.0.0-major-refactoring Aug 2, 2025
1 check passed
@hyochan hyochan deleted the feat/swift-package-manager-support branch August 2, 2025 03:02
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