Works with SPM and Cocoapods. To use SPM, remove Podfile as well as run pod deintegrate in the example/ios directory. You will know it worked when you don't see Running pod install... in the logs when running flutter run.
Package.swift does not have the same attributes that a podspec has. For example, you cannot set version, summary, description, homepage, license & authors.
Finally found a way to get firebase_core version and firebase-ios-sdk version dynamically in Package.swift file. Followed example of brave here. This works when running in Xcode and via Flutter CLI.
I've used firebase app installations as a product so we have access to firebase core, SPM doesn't ship firebase core as a standalone product.
TODO
[x] check how the other plugins work with the updates.
[x] update macOS podspec in firebase_core.
[x] write integration tests building with SPM.
[x] update macOS Package.swift to also extract versions dynamically. Test on Xcode build and via Flutter CLI
[x] Update integration test for macOS to check it also works via SPM. Extract into a shell script as it is becoming unmanageable.
Related Issues
Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.
[ ] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[ ] All existing and new tests are passing.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] The analyzer (melos run analyze) does not report any problems on my PR.
Description
Podfile
as well as runpod deintegrate
in theexample/ios
directory. You will know it worked when you don't seeRunning pod install...
in the logs when runningflutter run
.Package.swift
does not have the same attributes that a podspec has. For example, you cannot setversion
,summary
,description
,homepage
,license
&authors
.Package.swift
file causing build problem. I've also updated the podspec file to match.Package.swift
file. Followed example of brave here. This works when running in Xcode and via Flutter CLI.TODO
Package.swift
to also extract versions dynamically. Test on Xcode build and via Flutter CLIRelated Issues
Replace this paragraph with a list of issues related to this PR from the issue database. Indicate, which of these issues are resolved or fixed by this PR. Note that you'll have to prefix the issue numbers with flutter/flutter#.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process. Updating thepubspec.yaml
and changelogs is not required.///
).melos run 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?