I want to share one variable from my UIKit File to my Widget Extension created with SwiftUI. I followed this here. Please look at the answer from J Arango.
But i dont und
UserDefaults
UserDefaults(suiteName: )!.set("test", forKey: "test")
let testStr = UserDefaults(suiteName: )!.string(forKey: "test")
If you want to save other types see: