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

[IOS] Explore Swift Package Manager support. #29

Open
timbotimbo opened this issue Sep 6, 2024 · 2 comments
Open

[IOS] Explore Swift Package Manager support. #29

timbotimbo opened this issue Sep 6, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@timbotimbo
Copy link
Contributor

timbotimbo commented Sep 6, 2024

Description

This is not something that needs immediate attention, but something to keep in mind for the Future.
In Flutter 3.24, Flutter has started the process of moving ios plugins from cocoapods to Swift Package manager.

Given that Unity (plugins) uses cocoapods, I don't know if we can actually make this change. But staying on cocoapods might cause compatibility issues in future Flutter versions.

From whats new in Flutter 3.24

Swift Package Manager initial support

Today, Flutter uses CocoaPods to manage native iOS or macOS dependencies.

Flutter 3.24 adds early support for Swift Package Manager. This brings several benefits, including:

  1. Access to the Swift package ecosystem. Flutter plugins will be able to leverage 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 use Flutter for Apple’s platforms.

We encourage plugin authors to try adding support for Swift Package Manager to your plugins, and provide feedback on your experience.

From how-to-add-swift-package-manager-support-to-an-existing-flutter-plugin

Flutter plugins should support both Swift Package Manager and CocoaPods until further notice.

Swift Package Manager adoption will be gradual. Plugins that don't support CocoaPods won't be usable by projects that haven't migrated to Swift Package Manager yet. Plugins that don't support Swift Package Manager can cause problems for projects that have migrated.

@timbotimbo timbotimbo added the enhancement New feature or request label Sep 6, 2024
@jamesncl
Copy link
Collaborator

jamesncl commented Sep 6, 2024

Thanks for the heads-up. Forgive me but I'm not really familiar with build systems on iOS, so my questions may sound dumb.

What do you mean by 'Unity uses cocoapods'? What is it that makes it a 'cocoapods' thing? (I can't see a Podfile in the exported example project). Or to put it another way, what is it specifically that might mean we are not able to migrate the plugin to support Swift Package Manager? Thanks!

@timbotimbo
Copy link
Contributor Author

To be honest, I haven't used SPM before and haven't really looked into the details yet.
But I remember some unity plugins requiring pod install to work, and I believe those would have to support SPM too.

Maybe everything simply works after following the upgrade guide. But with the constant pain of innocent changes in Unity/Flutter/Xcode causing issues when combining them, it just wouldn't surprise me that things will break.

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

2 participants