Skip to content
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

☂️ Add Swift Package Manager compatibility #126005

Open
16 of 55 tasks
vashworth opened this issue May 3, 2023 · 8 comments
Open
16 of 55 tasks

☂️ Add Swift Package Manager compatibility #126005

vashworth opened this issue May 3, 2023 · 8 comments
Assignees
Labels
c: new feature Nothing broken; request for a new capability P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team

Comments

@vashworth
Copy link
Contributor

vashworth commented May 3, 2023

Work items

Add Swift Package Manager compatibility

Website docs:

Additional features:

Migrate plugins to Swift Package Manager

macOS

Bugs

Resources

Design doc: flutter.dev/go/swift-package-manager-plugins-v2
Original Github Issue: #33850

@vashworth vashworth self-assigned this May 3, 2023
@vashworth vashworth added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. package flutter/packages repository. See also p: labels. labels May 3, 2023
@stuartmorgan stuartmorgan added the P1 High-priority issues at the top of the work list label May 8, 2023
@vashworth vashworth added P2 Important issues not at the top of the work list and removed P1 High-priority issues at the top of the work list labels Jun 20, 2023
@flutter-triage-bot flutter-triage-bot bot added multiteam-retriage-candidate team-ios Owned by iOS platform team triaged-ios Triaged by iOS platform team labels Jul 8, 2023
@renanyoy

This comment was marked as off-topic.

@renanyoy
Copy link

renanyoy commented Oct 12, 2023

Would be nice to support spm for linux, windows and android targets too.

@stuartmorgan
Copy link
Contributor

@renanyoy Flutter does not support Swift as a language for any of those platforms. If you want to propose new supported languages that would need to be a new issue.

@dawid-niedzwiecki

This comment was marked as off-topic.

@danysz

This comment was marked as off-topic.

@renanyoy
Copy link

renanyoy commented Dec 5, 2023

@stuartmorgan , I have opened a new issue to handle it #139563

@importRyan
Copy link

This is exciting work. Please consider in the migration path that SPM will ignore architecture exclusions when a scheme includes "debug" or "development" in its name. Flutter requires "Debug" as a prefix.

sfshaza2 pushed a commit to flutter/website that referenced this issue Jul 16, 2024
Flutter iOS/macOS is migrating to Swift Package Manager for native
dependencies. This is an experimental feature this isn't ready yet for
app developers. However, plugin authors should add Swift Package Manager
support to their packages.

The faster plugin authors add SwiftPM support, the sooner we can drop
CocoaPods (and make it easier to install Flutter iOS!). There's [~10K
Flutter iOS
plugins](https://gist.github.com/loic-sharma/891a358f8abab36133e8a9395f719296)
that'll need to migrate, so we really need the plugin migration docs to
be as easy to follow as possible. Any and all feedback is appreciated!
:)
 
This is based off @vashworth's
[guide](flutter/flutter#146256 (comment)).

Question for reviewers: What do you think of the doc structure? Should
we rearrange things to make it clearer that some sections are to be
followed when things go wrong? Or is the current structure clear enough?

Preview URLs:

1. [Swift Package Manager for app
developers](https://flutter-docs-prod--pr10827-spm-compatibility-ilxd3b00.web.app/packages-and-plugins/swift-package-manager/for-app-developers)
2. [Swift Package Manager for plugin authors

](https://flutter-docs-prod--pr10827-spm-compatibility-ilxd3b00.web.app/packages-and-plugins/swift-package-manager/for-plugin-authors)

Part of flutter/flutter#126005

## Presubmit checklist

- [ ] This PR is marked as draft with an explanation if not meant to
land until a future stable release.
- [x] This PR doesn’t contain automatically generated corrections
(Grammarly or similar).
- [x] This PR follows the [Google Developer Documentation Style
Guidelines](https://developers.google.com/style) — for example, it
doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person).
- [x] This PR uses [semantic line
breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks)
of 80 characters or fewer.
@nate-thegrate nate-thegrate added the c: new feature Nothing broken; request for a new capability label Jul 19, 2024
@trivikr
Copy link

trivikr commented Aug 14, 2024

Updates from @orta of the CocoaPods team:

TLDR: We're still keeping it ticking, but we're being more up-front that CocoaPods is in maintenance mode.

If CocoaPods' only audience were native Cocoa developers, CocoaPods' usage should be on the decline, however, that is not the case. The popularity of React Native and Flutter have ensured that most metrics of usage/traffic have been steadily rising over time.

Q: I use CocoaPods as a Hidden Abstraction in My Framework
A: E.g. I maintain Unity, React Native, Flutter etc. A lot of these projects will (and should) be migrating to Swift Package Manager with time.

Sources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: new feature Nothing broken; request for a new capability P2 Important issues not at the top of the work list package flutter/packages repository. See also p: labels. platform-ios iOS applications specifically team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels. triaged-ios Triaged by iOS platform team
Projects
None yet
Development

No branches or pull requests

10 participants