GroupStateObserver
An object that contains information about the system’s ability to start SharePlay experiences.
Declaration
final class GroupStateObserverMentioned in
Overview
Starting a SharePlay experience with the Group Activities framework requires an active FaceTime call. Use a GroupStateObserver object to determine whether it’s possible to start such an experience. When no call is active, you might adjust your app’s user interface. For example, you might hide or remove controls that start a shared activity.
To get the current system state, create a GroupStateObserver object and check the value of its isEligibleForGroupSession property. To respond right away when the value of the property changes, configure a subscriber for that property.