I am having the same problem. My widgets stopped working with Xcode 16 and iOS 18 both on the simulator and on actual devices. I also am using UserDefaults to pass data, but the data is not passed but it was under previous Xcode versions. The app will still launch from the widget, but the widget data is missing.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: