Does anyone have the same problem? Tried on several devices, didn't help. Changing battery state does not work as well. I guess there should be another way to modify status bar on iOS 16. It worked on iOS 15 though.
xcrun simctl status_bar "iPhone 14 Plus" override --time "9:41"
Post
Replies
Boosts
Views
Activity
I know that the namespace property should not be inside the ViewModel because the identifiers are not going to match, but in this case, they actually do.Everything works fine and I just don't want to pass the namespace through all the views. Do you guys think there is a way to get rid of the annoying purple warning "Reading a Namespace property outside View.body. This will result in identifiers that never match any other identifier."?
class MyViewModel: ObservableObject {
var namespace: Namespace.ID
static let shared: MyViewModel = .init()
private init() {
@Namespace var namespace
self.namespace = namespace
}
}