One Logo Pool Ball
Media · IOS API REFERENCE

GroupActivities

Create app-specific activities your users can share and experience together.

50 types

109 callable entries

17 skipped

87% entry coverage

Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.

Types

BroadcastOptions

struct · iOS 15.0+

BroadcastOptions.ArrayLiteralElement

typealias · iOS 15.0+

BroadcastOptions.Element

typealias · iOS 15.0+

BroadcastOptions.RawValue

typealias · iOS 15.0+

CustomMessageIdentifiable

protocol · iOS 15.0+

GroupActivity

protocol · iOS 15.0+

GroupActivity.Sessions

typealias · iOS 15.0+

GroupActivityActivationResult

enum · iOS 15.0+

GroupActivityMetadata

struct · iOS 15.0+

GroupActivityMetadata.ActivityType

struct · iOS 15.0+

GroupActivityMetadata.Experience

enum · iOS 15.0+

GroupActivityMetadata.Experience.RawValue

typealias · iOS 15.0+

GroupActivityMetadata.LifetimePolicy

struct · iOS 18.0+

GroupActivityTransferRepresentation

struct · iOS 17.0+

GroupActivityTransferRepresentation.Body

typealias · iOS 17.0+

GroupSession

class · iOS 15.0+

GroupSession.Event

struct · iOS 15.0+

GroupSession.ObjectWillChangePublisher

typealias · iOS 15.0+

GroupSession.Sessions

struct · iOS 15.0+

GroupSession.Sessions.AsyncIterator

typealias · iOS 15.0+

GroupSession.Sessions.Element

typealias · iOS 15.0+

GroupSession.Sessions.Iterator

struct · iOS 15.0+

GroupSession.Sessions.Iterator.Element

typealias · iOS 15.0+

GroupSession.State

enum · iOS 15.0+

GroupSessionEvent

struct · iOS 15.0+

GroupSessionEvent.Action

struct · iOS 15.0+

GroupSessionEvent.Action.QueueChange

struct

GroupSessionEvent.Action.QueueChange.Item

struct

GroupSessionJournal

class · iOS 17.0+

GroupSessionJournal.Attachment

struct · iOS 17.0+

GroupSessionJournal.Attachment.ID

typealias · iOS 17.0+

GroupSessionJournal.Attachments

struct · iOS 17.0+

GroupSessionJournal.Attachments.AsyncIterator

typealias · iOS 17.0+

GroupSessionJournal.Attachments.Element

typealias · iOS 17.0+

GroupSessionJournal.Attachments.Iterator

struct · iOS 17.0+

GroupSessionJournal.Attachments.Iterator.Element

typealias · iOS 17.0+

GroupSessionMessenger

class · iOS 15.0+

GroupSessionMessenger.DeliveryMode

enum · iOS 16.0+

GroupSessionMessenger.MessageContext

struct · iOS 15.0+

GroupSessionMessenger.Messages

struct · iOS 15.0+

GroupSessionMessenger.Messages.AsyncIterator

typealias · iOS 15.0+

GroupSessionMessenger.Messages.Element

typealias · iOS 15.0+

GroupSessionMessenger.Messages.Iterator

struct · iOS 15.0+

GroupSessionMessenger.Messages.Iterator.Element

typealias · iOS 15.0+

GroupStateObserver

class · iOS 15.0+

GroupStateObserver.ObjectWillChangePublisher

typealias · iOS 15.0+

Participant

struct · iOS 15.0+

Participant.ID

typealias · iOS 15.0+

Participants

enum · iOS 15.0+

SceneAssociationBehavior

struct · iOS 17.0+

Functions and constants

method · iOS 15.0+

makeAsyncIterator

TypeScript
makeAsyncIterator(): GroupSessionMessenger_Messages_Iterator<number>
Swift declaration
func makeAsyncIterator() -> GroupSessionMessenger.Messages<Message>.Iterator

Creates the asynchronous iterator that produces elements of this asynchronous sequence. - Returns: An instance of the `AsyncIterator` type used to produce elements of the asynchronous sequence.

method · iOS 15.0+

next

TypeScript
next(): Promise<([number, GroupSessionMessenger_MessageContext]) | null>
Swift declaration
mutating func next() async -> GroupSessionMessenger.Messages<Message>.Element?

Asynchronously advances to the next element and returns it, or ends the sequence if there is no next element. - Returns: The next element, if it exists, or `nil` to signal the end of the sequence.

get · iOS 17.0+

sceneSessionIdentifier

TypeScript
get sceneSessionIdentifier(): (string) | null
Swift declaration
final var sceneSessionIdentifier: String? { get }

The persistent identifier of the session's associated scene. Use this property to determine which of your app's scenes belongs with this session. You can configure a ``GroupActivity`` object with a ``SceneAssociationBehavior`` type that tells the system how to associate the activity with one of your app's scenes. After matching the activity to a specific scene, the system places the scene identifier in this property.

method · iOS 15.0+

showNotice

TypeScript
showNotice(event: GroupSessionEvent): void
Swift declaration
final func showNotice(_ event: GroupSessionEvent)

Posts an event to the system, which displays the information in the system UI. Call this method to update the system's UI with information about session-related events. For example, a music-listening app might post an event to notify the group that a participant stopped playback. The system displays the event information only on the current device, and doesn't forward events to other devices. - Parameters: - event: The event to display in the system UI.

get

description

TypeScript
get description(): string
Swift declaration
final var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 15.0+

localParticipant

TypeScript
get localParticipant(): Participant
Swift declaration
final var localParticipant: Participant { get }

The participant on the current device. Use this property to differentiate the participant on the current device from participants on other devices.

get · iOS 15.0+

activeParticipants

TypeScript
get activeParticipants(): Array<Participant>
Swift declaration
@Published<Set<Participant>> final var activeParticipants: Set<Participant> { get }

The set of participants currently engaged in the activity. This property reflects the set of people invited to a group session and currently engaged in the shared activity on their device. Members who join the conversation over FaceTime but don't join the shared activity aren't active participants. As people join or leave the activity, the session object updates the set of active participants. To detect changes to this property, configure a subscriber. Each ``Participant`` object corresponds to a joined session on a device. If a single person joins the activity from two devices simultaneously, the set contains a separate ``Participant`` object for each device.

get · iOS 18.0+

isLocallyInitiated

TypeScript
get isLocallyInitiated(): boolean
Swift declaration
final let isLocallyInitiated: Bool

A Boolean value that is true if the current session was created by the local participant.

get · iOS 15.0+

$activeParticipants

TypeScript
get $activeParticipants(): _Combine_Published_Publisher<Array<Participant>>
Swift declaration
final var $activeParticipants: Published<Set<Participant>>.Publisher { get }
method · iOS 15.0+

requestForegroundPresentation

TypeScript
requestForegroundPresentation(): void
Swift declaration
final func requestForegroundPresentation()

Tells the system that your app needs to be in the foreground to continue an activity. Call this method if your app is in the background and can't start the activity without the participant's assistance. For example, you might call the method if your app requires the participant's credentials to play back a shared media file. Don't call this method if you're able to start the activity without assistance. When you call this method, the system asks the participant to continue the activity in your app. To create a smoother user experience, the system might launch your app in the background when starting an activity. Apps can start activities in either the foreground or background, but you might configure your app differently when in the background. For example, when in the background, you play media files in a picture-in-picture window instead of a fullscreen interface. This method lets you notify the user when a background solution isn't possible. The session must be in the ``State-swift.enum/waiting`` or ``State-swift.enum/joined`` state when you call this method. If it isn't, this method does nothing.

get · iOS 15.0+

id

TypeScript
get id(): string
Swift declaration
final let id: UUID

The unique identifier of the current session. The system assigns a globally unique identifier to each session. This identifier is valid only for the lifetime of the session object.

method · iOS 15.0+

end

TypeScript
end(): void
Swift declaration
final func end()

Ends the activity for the entire group and stops the transfer of synchronized data. Call this method to end the activity for all participants. When you call this method, the session transitions to the ``State-swift.enum/invalidated(reason:)`` state and stops the delivery of session-related updates. After ending the session, you can't join it again. Don't call this method on a session already in the ``State-swift.enum/invalidated(reason:)`` state.

method · iOS 15.0+

join

TypeScript
join(): void
Swift declaration
final func join()

Starts the shared activity on the current device. Call this method to begin the delivery of synchronized data to the current device. Typically, you call this method when your app is ready to engage in an activity. For example, call it when you present your app’s UI for the activity. When your app successfully joins the session, the session changes the value in its ``state-swift.property`` property to ``State-swift.enum/joined``.

get · iOS 15.0+

originator

TypeScript
get originator(): Participant
Swift declaration
let originator: Participant

The participant that initiated the event.

get · iOS 15.0+ · Deprecated in iOS 15.0

localizedDescription

TypeScript
get localizedDescription(): string
Swift declaration
var localizedDescription: String { get }

A localized description of the event

method · iOS 15.0+

leave

TypeScript
leave(): void
Swift declaration
final func leave()

Leaves the current activity and stops receiving synchronized data. When you call this method, the session transitions to the ``State-swift.enum/invalidated(reason:)`` state and stops the delivery of session-related updates. Call this method when the user dismisses your app’s activity-related UI. Don't call this method on a session already in the ``State-swift.enum/invalidated(reason:)`` state.

get · iOS 15.0+

state

TypeScript
get state(): GroupSession_State<SDKHandle>
Swift declaration
@Published<GroupSession<ActivityType>.State> final var state: GroupSession<ActivityType>.State { get }

The current state of the session. Use this property to get the current state value, or configure a subscriber to detect changes to the value. To change the state of a session, call the ``join()`` and ``leave()`` methods. If a failure occurs or the session ends, the session object transitions to the ``State-swift.enum/invalidated(reason:)``state. If the session ends because of an error, it provides information about that error.

get · iOS 15.0+

$state

TypeScript
get $state(): _Combine_Published_Publisher<GroupSession_State<SDKHandle>>
Swift declaration
final var $state: Published<GroupSession<ActivityType>.State>.Publisher { get }
method · iOS 15.0+

makeAsyncIterator

TypeScript
makeAsyncIterator(): GroupSession_Sessions_Iterator<SDKHandle>
Swift declaration
func makeAsyncIterator() -> GroupSession<ActivityType>.Sessions.Iterator

Creates the asynchronous iterator that produces elements of this asynchronous sequence. - Returns: An instance of the `AsyncIterator` type used to produce elements of the asynchronous sequence.

method · iOS 15.0+

next

TypeScript
next(): Promise<(GroupSession<SDKHandle>) | null>
Swift declaration
mutating func next() async -> GroupSession<ActivityType>?

Asynchronously advances to the next element and returns it, or ends the sequence if there is no next element. - Returns: The next element, if it exists, or `nil` to signal the end of the sequence.

get · iOS 15.0+

$activity

TypeScript
get $activity(): _Combine_Published_Publisher<SDKHandle>
Swift declaration
final var $activity: Published<ActivityType>.Publisher { get set }
set · iOS 15.0+

$activity

TypeScript
set $activity(value: _Combine_Published_Publisher<SDKHandle>)
Swift declaration
final var $activity: Published<ActivityType>.Publisher { get set }
method · iOS 15.0+

postEvent

TypeScript
postEvent(event: GroupSession_Event<SDKHandle>): void
Swift declaration
final func postEvent(_ event: GroupSession<ActivityType>.Event)

Posts an event to the system, which displays the information in the system UI. Call this method to update the system's UI with information about session-related events. For example, a music-listening app might post an event to notify the group that a participant added a song to a shared playlist. The system displays the event information only on the current device. It doesn't forward events to other devices. - Parameters: - event: The event to display in the system UI.

Skipped declarations

17 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

GroupSession.activity

This declaration needs Swift generic type arguments. (no canonical witness for ActivityType)

GroupActivity.activityIdentifier

Static protocol requirements cannot be called through an instance.

GroupActivityTransferRepresentation.init(exporting:)

This declaration needs Swift generic type arguments. (no canonical witness for ActivityType)

GroupActivityTransferRepresentation.body

This protocol needs associated types that cannot yet cross the bridge.

GroupActivity.transferRepresentation

This protocol needs associated types that cannot yet cross the bridge.

GroupSessionJournal.init(session:)

This declaration needs Swift generic type arguments. (no canonical witness for Activity)

GroupSessionJournal.Attachment.load(_:)

The iOS SDK compiler rejected this binding: cannot find type 'CoreTransferable' in scope

GroupSessionMessenger.init(session:)

This declaration needs Swift generic type arguments. (no canonical witness for Activity)

GroupSessionMessenger.init(session:deliveryMode:)

This declaration needs Swift generic type arguments. (no canonical witness for Activity)

GroupSession.Event.init(originator:localizedDescription:)

The containing type needs Swift generic type arguments. (no canonical witness for ActivityType)

GroupSessionMessenger.messages(of:)

Passing a Swift type itself is not supported.

GroupActivity.sessions()

Static protocol requirements cannot be called through an instance.

NSItemProvider.registerGroupActivity(preparationHandler:)

This declaration needs Swift generic type arguments. (no canonical witness for ActivityType)

NSItemProvider.registerGroupActivity(_:)

This declaration needs Swift generic type arguments. (no canonical witness for ActivityType)

AVPlaybackCoordinator.coordinateWithSession(_:)

This declaration needs Swift generic type arguments. (no canonical witness for T)

protocol implementation GroupActivity

non-method protocol requirement

protocol implementation CustomMessageIdentifiable

non-method protocol requirement