Called when the user selects a Home screen quick action for your app, except when you’ve intercepted the interaction in a launch method.
- iOS 9.0+
Your shared app object.
The quick action for which you are providing an implementation in this method.
Implement this method to respond to the user’s selection of a Home screen quick action for your app; call the completion handler, with an appropriate Boolean value, when finished.
It’s your responsibility to ensure the system calls this method conditionally, depending on whether or not one of your app launch methods (
application(_:) has already handled a quick action invocation. The system calls a launch method (before calling this method) when a user selects a quick action for your app and your app launches instead of activating.
The requested quick action might employ code paths different than those used otherwise when your app launches. For example, say your app normally launches to display view A, but your app was launched in response to a quick action that needs view B. To handle such cases, check, on launch, whether your app is being launched via a quick action. Perform this check in your
application(_: method by checking for the
shortcut launch option key. The
UIApplication object is available as the value of the launch option key.
If you find that your app was indeed launched using a quick action, perform the requested quick action within the launch method and return a value of
false from that method. When you return a value of
false, the system does not call the