prepareForActivation()
Returns the participant’s preferred option for how to start the activity.
Declaration
func prepareForActivation() async -> GroupActivityActivationResultMentioned in
Return Value
The action to take for the activity. Use this value to determine whether to start an activity locally or as a shared experience.
Discussion
Call this method as the first step in starting a group activity, instead of calling the activate() method. Specifically, call this method when the participant tries to start an activity directly from your app’s UI — for example, when they try to watch a movie that’s shareable with a group. This method determines if sharing is possible, and may also prompt the participant to choose whether to start the activity locally or share it with the group.
The system learns over time what activities the user commonly shares, and may not prompt the user in all situations. The system also doesn’t prompt the user if the user disabled activity sharing or isn’t a member of an active group.