Contents

beginActivity(options:reason:)

Begin an activity using the given options and reason.

Declaration

func beginActivity(options: ProcessInfo.ActivityOptions = [], reason: String) -> any NSObjectProtocol

Parameters

  • options:

    Options for the activity. See Activityoptions for possible values.

  • reason:

    A string used in debugging to indicate the reason the activity began.

Return Value

An object token representing the activity.

Discussion

Indicate completion of the activity by calling endActivity(_:) passing the returned object as the argument.

See Also

Managing Activities