Tells the delegate that the data for continuing an activity is available.
- iOS 8.0+
- tvOS 9.0+
The shared app object that controls and coordinates your app.
The activity object containing the data associated with the task the user was performing. Use the data to continue the user's activity in your iOS app.
A block to execute if your app creates objects to perform the task. Calling this block is optional and you can copy this block and call it at a later time. When calling a saved copy of the block, you must call it from the app’s main thread. This block has no return value and takes the following parameter:
An array of
UIResponderobjects representing objects you created or fetched in order to perform the operation. The system calls the
restoremethod of each object in the array to give it a chance to perform the operation.
User Activity State:
YES to indicate that your app handled the activity or
NO to let iOS know that your app did not handle the activity.
The app calls this method when it receives data associated with a user activity. For example, when the user uses Handoff to transfer an activity from a different device.
Use this method to update your iOS app so that the user can continue the activity from where they left off. If you do not implement this method or if your implementation returns
NO, iOS tries to create a document for your app to open using a URL.
Calling the block in the
restoration is optional and is only needed when specific objects are capable of continuing the activity.
For more information on Handoff, see Handoff Programming Guide.
Handling Activities from SiriKit
This method is called whenever your app is launched to handle a SiriKit intent. Update your app's user interface based on the
user parameter. Your app should seamlessly continue the interaction that began in Siri.
By default, the intent provides an
NSUser object whose
interaction property contains both the originating intent and your response. You can add additional, app-specific information by creating a new
NSUser object in your intent's
handle method, and adding your data to the activity's
When continuing activities from SiriKit:
Look for the intent specified in the
interactionproperty. Resume handling this intent in your app.
Intents may launch your app under the following circumstances:
Some intents always launch the app after the intent is successfully handled (for example, intents with a
confirmmethods launch the app when you resolve the intent with a
failure(or similar) response code.
Requiring App Launch
The user can always decide to launch the app at any point in a Siri transaction.