Skip to content

Conversation

simolus3
Copy link
Contributor

@simolus3 simolus3 commented Sep 1, 2025

For native dependencies on Apple platforms, Flutter is migrating to Swift package manager to replace CocoaPods.

SPM support is experimental at the moment (users have to opt-in with flutter config --enable-swift-package-manager). But since we can support both in powersync_flutter_libs, we probably should:

  • We're still early, but CocoaPods trunk will become read-only in 15 months. So we have to migrate all our SDKs eventually.
  • Users have a similar interest, and they can only switch to SPM after all their dependencies have. So this unblocks users.

So, this PR:

  • merges ios and macos podspecs for powersync_flutter_libs into a single darwin directory for simplicity.
  • creates a new SPM package for powersync_flutter_libs depending on our core extension dependency.
  • updates demos/supabase-todolist-drift to use SPM exclusively.
  • updates demos/supabase-todolist to use CocoaPods (and explicitly opt out of SPM) so that we can keep testing both variants of powersync_flutter_libs.

I ran both updated projects on macOS and an iOS simulator for verification.

Copy link
Contributor

@rkistner rkistner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy with the changes in general - would be great to not depend on CocoaPods anymore!

I see some of the platform support versions have changed - are these differences intentional?

  1. ios: 11.0 in podspec, now 12.0 in podspec, 13.0 in Package.swift
  2. osx: Was 10.11 in podspec, now 10.14 in podspec, 10.15 in Package.swift

@simolus3
Copy link
Contributor Author

simolus3 commented Sep 1, 2025

I see some of the platform support versions have changed - are these differences intentional?

I think we could keep referencing the older versions as well, but iOS 13 and macOS 10.15 are the minimum versions supported by Flutter. I agree that we should make these consistent though.

@simolus3 simolus3 merged commit 6a2ff65 into main Sep 1, 2025
5 checks passed
@simolus3 simolus3 deleted the swiftpm branch September 1, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants