Execute a given function with a provided activity.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- watchOS 3.0+
An activity object.
You can alternatively pass one of the global activity constants, such as OS_ACTIVITY_NONE or OS_ACTIVITY_CURRENT.
Context to pass to the function. This may be
The function to be executed within the context of the given activity.