yeniel / native_shared_preferences

BSD 3-Clause "New" or "Revised" License
7 stars 24 forks source link

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

Open kaciula opened 2 months ago

kaciula commented 2 months ago

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 commented 1 month ago

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.