One Logo Pool Ball
GroupActivities · IOS API REFERENCE

GroupSessionEvent

struct · iOS 15.0+ · SDK 27.1

struct GroupSessionEvent

A session-related event that appears in the system UI. Use this structure to specify the contents of custom activity-related events. The AV Foundation framework posts media-related events to the system on your app's behalf; create an instance of this structure if your app posts additional events that don't route through AV Foundation. After creating an instance of this structure, post it to the system using the ``GroupSession/showNotice(_:)`` method of ``GroupSession``.

Members (4)

init · iOS 15.0+

init

TypeScript
static init(originator: Participant, action: GroupSessionEvent_Action, url?: (string) | null): GroupSessionEvent
Swift declaration
init(originator: Participant, action: GroupSessionEvent.Action, url: URL?)

Creates a new event with the specified participant and action details. - Parameters: - originator: The participant that initiated the event. - action: The action to report for the event. The system uses this value to generate a localized description of the action in the system UI. - url: The location in your app where the action occurred. Specify a universal link into your app that takes the participant to the action details. Specify `nil` to bring your app to the foreground without navigating to a specific location.

get · iOS 15.0+

originator

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

The participant that initiated the event.

get · iOS 15.0+

url

TypeScript
get url(): (string) | null
Swift declaration
let url: URL?

The URL to open when the participant taps the event link in the system UI. When the user taps your custom event in the system UI, the system opens the provided URL. Specify a universal link to open your app to the place where the action occurred. If the value of this link is `nil`, the system brings your app to the foreground. For information about how to support universal links in your app, see <doc://com.apple.documentation/documentation/xcode/supporting-universal-links-in-your-app>

get · iOS 15.0+

action

TypeScript
get action(): GroupSessionEvent_Action
Swift declaration
let action: GroupSessionEvent.Action

The reason for the event. The system uses this information to craft a message in the system UI.

Skipped declarations

No declarations were skipped in this snapshot.

All GroupActivities types →