My swift app has several places where it updates data stored with SwiftData. In each place I have to remember to add function doSomethingWithTheUpdatedData().
I would like my app to be reactive and call doSomethingWithTheUpdatedData() from a single place opposed to be scattered throughout my app. How to accomplish this?
Post
Replies
Boosts
Views
Activity
As can be seen here, all categories are expanded but nothing under them:
Not sure if related, but when I tried to upload my app for internal TestFlight testing I got following error:
The code looks like this:
@ObservedObject var model : MyModel
@State var isPresented = false
var body: some View {
Button("select apps to discourage"){
isPresented = true
}.onAppear {
Task {
do {
try await AuthorizationCenter.shared.requestAuthorization(for: .child)
} catch {
}
}
}.familyActivityPicker(isPresented: $isPresented, selection: $model.selectionToDiscourage)
}
}
Now I am wondering, is there one more thing that I need to do before familyActivityPicker would work?
Here is what I have done: I subscribed to $99 Apple developer plan, Then I was finally able to see and add Family Controls capability under my Xcode project, Then I created Apple Family and logged in iphone (and simulator) as child. Then several days ago I submitted this form - https://developer.apple.com/contact/request/family-controls-distribution (not sure if this was mandatory for internal testing, but I have not received any communication from Apple - even confirmation for my request).