plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

feat(battery_plus): Support Swift Package Manager

Open koji-1009 opened this issue 1 year ago • 2 comments

Description

Add SPM support.

https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors

I also noticed an error in the documentation. Since we need to refer to the documentation when reviewing PRs, it will be draft until the next PR is reviewed.

https://github.com/flutter/website/pull/11020


As a working test, I have confirmed that it can be built with flutter 3.24 + CocoaPods, and that it can be built with flutter main channel + SPM. Note that if you try building with main channel + SPM, you will need to remove some steps from your iOS project, as the script to add Pods is no longer needed.

Related Issues

  • Related #3152

Checklist

  • [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • [x] I titled the PR using Conventional Commits.
  • [x] I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • [x] All existing and new tests are passing.
  • [x] The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • [ ] Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • [x] No, this is not a breaking change.

koji-1009 avatar Aug 08 '24 06:08 koji-1009

I would be happy to include flutter/website PR and feel free to review it. There is no need to rush and we would like to discuss how it should be implemented.

koji-1009 avatar Aug 10 '24 05:08 koji-1009

The contents of the ios/ directory will not be uploaded to https://cocoapods.org/. So pod spec lint shows multiple problems, but I don't see any major issues. I'm sure time will solve the problem in the future once the migration from CocoaPods to SPM is complete.

koji-1009 avatar Aug 12 '24 04:08 koji-1009