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

Swift Package Manager Support? (CocoaPods is officially deprecated!) #21

Open
Jeehut opened this issue Oct 2, 2024 · 5 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@Jeehut
Copy link

Jeehut commented Oct 2, 2024

The maintainers of CocoaPods recently announced that they're stopping active work on it and they strongly encourage everyone to switch to Swift Package manager. They even directly addressed Flutter developers:

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. As specified above, we are not breaking anything but bugs you may raise are unlikely to get fixed.

It seems that the Flutter team had been working on SwiftPM support for some time, and they clearly heard about the announcement. I even found docs targeted towards plugin authors:
https://docs.flutter.dev/packages-and-plugins/swift-package-manager/for-plugin-authors

I can't really judge the complexity or feasibility of this myself, but I can say that our CocoaPods release pipeline is broken yet again and I couldn't find a way to fix it on first try. Dropping support for CocoaPods from the SwiftSDK would be a great relief, so if there's any chance we can switch to SwiftPM, we should at least evaluate when & how this could be tackled.

@kkostov
Copy link
Contributor

kkostov commented Oct 2, 2024

I wouldn't advise directly adopting features from from the main channel until they have been officially released. We could include support for SPM in a beta version of the TelemetryDeck SDK for Flutter (with an experimental notice) so it can be previewed.

However, this does no mitigate the need for the package to be available via CocoaPods. Even with SPM support turned on, the current guideline is for Flutter plugins to support both Swift Package Manager and CocoaPods until further notice. (cf. here) as people will be facing a mix of both for quite some time.

If the CocoaPods build is unrecoverable, we could explore other alternatives:

  • The Kotlin SDK can be easily upgraded to include Kotlin Multiplatform support, which allows publishing of CocoaPods packages for targets on Apple platforms.

  • The Telemetry Deck SDK for Flutter functionality can be implemented in native Dart, dropping the need to depend on the native plugins (this will have some benefits for users who prefer Dart-only packages).

@kkostov
Copy link
Contributor

kkostov commented Oct 2, 2024

On a side-note, Xcode 15 support is also still needed - the Flutter package should be able to build successfully with Xcode 15. Perhaps adapting the CocoaPods action to use Xcode 15 can help solve the build issue? At the moment, CocoaPods does not support Xcode 16 yet.

@Jeehut
Copy link
Author

Jeehut commented Nov 5, 2024

It seems the missing Xcode 16 support is now there, because without me adjusting the workflow, the latest release of 2.5.0 seems to have successfully gone through, see here: https://github.com/TelemetryDeck/SwiftSDK/actions/workflows/cocoapods.yaml

I have not checked if everything is accessible in CocoaPods builds though, so please let me know if there's anything missing.

@kkostov kkostov added the enhancement New feature or request label Dec 16, 2024
@kkostov kkostov self-assigned this Dec 16, 2024
@importRyan
Copy link

SPM is now supported on Flutter stable

@kkostov
Copy link
Contributor

kkostov commented Dec 21, 2024

@importRyan indeed, support for SPM will be enabled in an upcoming update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants