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

Cannot build for MacOS if I also include shared_preferences plugin #18

Open
kaciula opened this issue Sep 5, 2024 · 2 comments
Open

Comments

@kaciula
Copy link

kaciula commented Sep 5, 2024

When building for MacOS I get error: ambiguous use of 'register(with:)' and this is because the GeneratedPluginRegistrant.swift file contains 2 lines to register a plugin with the same name: SharedPreferencesPlugin

The name of this plugin should be different than the one from shared_preferences so that they can be both included when building for Mac.

Screenshot 2024-09-05 at 11 27 55

@JetA2
Copy link

JetA2 commented Sep 29, 2024

I have the same issue. I suspect it's because native_shared_preferences depends on shared_preferences_macos while the shared_preferences package depends on the new unified shared_preferences_foundation which is for both MacOS and iOS. The generated plugin registrant then tries to register both.

@kaciula
Copy link
Author

kaciula commented Dec 17, 2024

@JetA2 Have you figured out a workaround to be able to build for MacOS using both plugins?

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

No branches or pull requests

2 participants