The UserDefaults module is using SwiftUI API (Binding) which is only limited by iOS Version but not by availability of SwiftUI dependency. Therefore projects using UserDefaults submodule without linking SwiftUI will not work.
The Api should be encapsulated and should only be available if SwiftUI is available.
The UserDefaults module is using SwiftUI API (
Binding
) which is only limited by iOS Version but not by availability of SwiftUI dependency. Therefore projects using UserDefaults submodule without linking SwiftUI will not work.The Api should be encapsulated and should only be available if SwiftUI is available.