Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 18.104.22.168 release ready!
Updated 26 October 2021
In iOS 12 Apple provides the capability to add the Siri within the App where you can execute or perform a task by informing to Siri. Here we are taking the example of showing the cart data using
Cart Data means : It is viewcontroller class which show the cart item .
Siri Shortcut is basically a voice command where you have to registered first after that when the siri detect the same voice command then it will automatically execute your task.
For this Follows this Steps:
Here we have taken the bundle ID of Application :
Here we have created the CartShortcut Class , it will return the Siri Shortcut Object.
a: take UIButton , name as Siri Shortcut or you can add the image.
b: take a UITableView where you can show the previous & current phrase of Siri Shortcut . you can edit or delete this phrase as well.
c:Write the Function of this class.
Note: Here we have taken the delegate of Siri Shortcut for Add & edit case
d: First we will check weather previous phrases are available or not , if available then show to user so they can edit or delete this.
Note: It will show all the available phrases on TableView.
here you can see, on click of any Cell we are calling edit shortcut class so that it will help to edit or delete this phrase.
List of available phrase:
On Click on that:
Now we are aware about the available phrase edit & delete .
create a Outlet of Button then write this:
Note: Now you can add the new siri shortcut in your App.
when you add all the shortcut in your App then we have to handle this ,by which we can perform desired work for this.
a: Go to Appdelegate.swift class & write this.
it will match with siri shortcut ID that you have given on creation .
here We have managed through Notification Center so it will inform when it will be execute.
Your email address will not be published. Required fields are marked*
Save my name email and website in this browser for the next time I comment.
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.