How to store at one time more than one app while selection from FamilyActivityPicker?
.familyActivityPicker(
isPresented: $isDiscouragedPresented,
selection: $model.selectionToDiscourage
)
The code above save only one token. If user select more than one app the FamilyActivitySelection.applicationTokens becomes empty [], but if select only one app, applicationTokens will contain one token from selected app.
I'm not sure exactly what is happening here, but if you choose all the apps in one category, then the behavior I've seen is that you get a selection for the category, but no selection for the apps in that category.
There's a property that seems to control this:
Maybe you should set that to true when creating your FamilyActivitySelection?
If you're seeing surprising FamilyActivitySelection results when selecting more than 1 (but not all) of the apps in a category, then I recommend you file a bug report via Feedback Assistant and reply here with the feedback number.