A completion handler to execute after the activity view controller is dismissed.
- iOS 8.0+
- tvOS 9.0+
Upon the completion of an activity, or the dismissal of the activity view controller, the view controller’s completion block is executed. You can use this block to execute any final code related to the service. The parameters of this block are as follows:
The type of the service that was selected by the user. For custom services, this is the value returned by the
activitymethod of a
UIActivityobject. For system-defined activities, it is one of the strings listed in "Built-in Activity Types” in
trueif the service was performed or
falseif it was not. This parameter is also set to
falsewhen the user dismisses the view controller without selecting a service.
An array of
NSExtensionobjects containing any modified data. Use the items in this array to get any changes made to the original data by an extension. If no items were modified, the value of this parameter is
An error object if the activity failed to complete, or
nilif the the activity completed normally.