purchases-flutter icon indicating copy to clipboard operation
purchases-flutter copied to clipboard

Add Swift Package Manager support

Open loic-sharma opened this issue 1 year ago • 10 comments

Hello,

Flutter is migrating to Swift Package Manager. Please add Swift Package Manager support to your plugin.

Flutter will eventually deprecate and then remove support for CocoaPods. Adding Swift Package Manager support future-proofs your plugins.

How to add Swift Package Manager support to your plugins

You can find the migration guide here: https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors#how-to-add-swift-package-manager-support-to-an-existing-flutter-plugin

If you run into issues or have questions, please reach out to the Flutter team. You can ping me at @loic-sharma, send a message to the #hackers-ios channel on Flutter’s discord, or open a GitHub issue.

Thank you for your wonderful contributions to the Flutter ecosystem!

Why is Flutter migrating to Swift Package Manager?

CocoaPods is now in maintenance mode.

Swift Package Manager support is one of Flutter’s most requested features: flutter#33850.

Flutter's Swift Package Manager integration has several benefits:

  1. Access to the Swift package ecosystem. Flutter plugins can use the growing ecosystem of Swift packages.
  2. Simplifies Flutter installation. Swift Package Manager is bundled with Xcode. In the future, you won’t need to install Ruby and CocoaPods to target iOS or macOS.

loic-sharma avatar Dec 03 '24 21:12 loic-sharma

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

RCGitBot avatar Dec 03 '24 21:12 RCGitBot

Hi @loic-sharma, Thank you for taking the time to set this up! Our SDK team is aware and will add this to our roadmap to work on!

kmurphy-rc avatar Dec 09 '24 16:12 kmurphy-rc

@kmurphy-rc Any updates on this? I tried to integrate RevenueCat with our app today, but I'd need to include Cocoapods into our build pipeline and CI/CD - all other dependencies we have work with SPM, and I really don't want an entire Cocoapod setup just for one library 😞

ikurek avatar Jul 28 '25 22:07 ikurek

@GuilhermeMota93 @cperriam-rc Maybe you can help me, since the issue seems to be abandoned. Are there any plans to use SPM with Flutter package? If so, is there any date selected for release? I'd really like to know, before I start making changes to our pipeline to get it working with cocapods 😅

ikurek avatar Aug 11 '25 16:08 ikurek

Hey @ikurek, apologies for the delay here!

I will be reaching out to the team internally to get an update.

EDIT: I uncovered this other issue on #1324 that seems to be related

GuilhermeMota93 avatar Aug 11 '25 16:08 GuilhermeMota93

Thank you! I'll be waiting for further info 🙂 SPM is the recommended approach for quite some time now, so it would be nice to provide support for it in the plugin, as far as I can tell the Revenuecat iOS SDK already supports it.

EDIT: I uncovered this other issue on #1324 that seems to be related

I'm not sure if it's related, but moving from Cocoapods to SPM may solve the issue, since it seems to be related directly to pods configuration.

ikurek avatar Aug 11 '25 17:08 ikurek

Hey @ikurek!

Apologies for the confusion earlier, the issue I linked isn’t actually related to what you’re running into 😅 unsure how I got there and thought to connect them.

But I reached out to the team for more context in the meantime, and I can confirm that we do intend to add SPM soon, but there’s no specific release date yet!

It is on the pending task list to tackle next, so I’ll make a note to reach out when I have a more concrete update on timing.

GuilhermeMota93 avatar Aug 12 '25 08:08 GuilhermeMota93

@GuilhermeMota93 Thank you for the information, but can you maybe provide a definition of soon? The original issue was opened last year, and 8 months ago we received information, that it's on the roadmap, so it would be nice to know a little bit more about the release date 😅

ikurek avatar Aug 12 '25 12:08 ikurek

Hey @ikurek ! I completely understand 🙏 But unfortunately there’s no ETA I can share right now.

I’ve nudged this for an internal update and flagged it for prioritisation, so I’m hoping to get more clarity from the team. I’ll reach out as soon as I have something concrete.

GuilhermeMota93 avatar Aug 12 '25 13:08 GuilhermeMota93

Quick note to say that we are still looking into this 🙏

The team is a bit stretched at the moment, but just to assure you this isn't forgotten - thanks for your patience here!

GuilhermeMota93 avatar Aug 26 '25 10:08 GuilhermeMota93