-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(core): support for using SPM (Swift Package Manager) #12786
Conversation
packages/firebase_core/firebase_core/example/ios/Runner.xcodeproj/project.pbxproj
Show resolved
Hide resolved
packages/firebase_core/firebase_core/ios/firebase_core/Package.swift
Outdated
Show resolved
Hide resolved
@russellwheatley Excellent work! Did you follow Flutter's Swift Package Manager migration guide to create this pull request? If so, what problems did you run into? Do you have any feedback on the guide and how we could improve it? |
Co-authored-by: Loïc Sharma <[email protected]>
Hey @loic-sharma - thanks! Sorry for the late response. I actually used the instructions on the pull request which seems like a precursor to the documentation you linked. It was actually a pretty good guide! The only trouble I ran into was project specific such as being able to get the firebase-ios-sdk version from within Package.swift file, and also trying to parse preprocessor definitions 😄 |
Looks like in order to support other packages, this one needs to get merged first. It would be also good to have one plugin migrated to show how to get flutter core package in spm |
let package = Package( | ||
name: "firebase_core", | ||
platforms: [ | ||
.iOS("12.0"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch 👍
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 the
pubspec.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?