Has anyone been able to get SharePlay working with the iOS 14 beta 7 and the SharePlay development profile?

I have the iOS 14 beta 7 and the SharePlay development profile installed on two devices, however whenever I'm on a FaceTime call with them, GroupStateObserver().isEligibleForGroupSession returns false in the app that I am attempting to start a group activity in.

Has anyone been able to successfully get SharePlay working using this configuration, which should supposedly work according to https://developer.apple.com/forums/thread/688155?

Answered by paulathekoala in 686398022

Self-answering this one: isEligibleForGroupSession seems to return false no matter what, but it turns out that activating the group activity works as expected anyway (I had isEligibleForGroupSession being true as a prereq for launching the activity, but after removing this check I'm able to go ahead with calling activate() anyway).

Sorry, obviously a typo here, but this is about the iOS 15 beta!

Accepted Answer

Self-answering this one: isEligibleForGroupSession seems to return false no matter what, but it turns out that activating the group activity works as expected anyway (I had isEligibleForGroupSession being true as a prereq for launching the activity, but after removing this check I'm able to go ahead with calling activate() anyway).

FYI: GroupStateObserver is refreshing isEligibleForGroupSession asynchronously. So it's not holding the correct value after initializing it. This isn't well documented.

The way to use this is to hold an instance of GroupStateObserver somewhere. Keep in mind that the initial value won't be correct, when launching the app during a FaceTime call. You can use the publisher to be notified of updates. The publisher fires before the state updates (objectWillChange) and in next RunTime loop the Bool should be updated.

In the WWDC session the observer is wrapped as @StateObject to only initialize the GroupStateObserver once during the view lifetime and to update the view, when the objectWillChange publisher of the GroupStateObserver fires.

let eligible = GroupStateObserver().isEligibleForGroupSession // won't work, always false
Has anyone been able to get SharePlay working with the iOS 14 beta 7 and the SharePlay development profile?
 
 
Q