An object that contains information about the system’s ability to start SharePlay experiences.
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.
Members (3)
get · iOS 15.0+
isEligibleForGroupSession
TypeScript
get isEligibleForGroupSession(): boolean
Swift declaration
@Published<Bool> final var isEligibleForGroupSession: Bool { get }
A Boolean value that indicates whether the system can start a group session.
This property indicates whether a FaceTime call is active and the system can
create group sessions. Configure a subscriber to this property to monitor changes to
the system’s state. When the system can create group sessions, it sets the value
of this property to `true`. When the creation of a group session isn’t possible, the
system sets the value to `false`.
get · iOS 15.0+
$isEligibleForGroupSession
TypeScript
get $isEligibleForGroupSession(): _Combine_Published_Publisher<boolean>
Swift declaration
final var $isEligibleForGroupSession: Published<Bool>.Publisher { get }
init · iOS 15.0+
init
TypeScript
static init(): GroupStateObserver
Swift declaration
convenience init()
Creates a new group state observer object for determining the availability of group sessions.