I have an app coded with UIKit and want to add a simple Widget with Widgetkit. How can I pass the data to the Widget?
As you know the widget works with SwiftUI.
I only need to pass one variable. Thats it. The rest will be done with SwiftUI.
I tried it with UserDefaults but it didn't work.
As you know the widget works with SwiftUI.
I only need to pass one variable. Thats it. The rest will be done with SwiftUI.
I tried it with UserDefaults but it didn't work.