Check Mobile App
Read now
Start a Project

Implement Application Shortcut in App using swift 4

Save

Application Shortcut

Application shortcut is the way where we can perform some task fast without open the main App & go to particular section . App Shortcut will directly to specified location , but there is some limitation to use this Shortcut it will support to iPhone 6s to above phone .

There is Some Steps to Follow.

1: Open Your App Delegate File .

a: Here I have taken one shortcut that will go to your Cart Controller in App.

declare their unique key : it is unique key to define the App Shortcut that will help to update this name or other value later .

b: Go to this Function in App Delegate file and write this:

c: Now we have to define this method:

 

Note: Here we are checking the App Shortcut is Created before or not so if is empty than it will create other wise return the previous one.

d: Declare Shortcut Item in Appdelegate.swift class:

2: Handle the Click Event Of App Shortcut.

a: Override this method in App Delegate file:

Note: If you click on Any Shortcut item , this method will automatically call so you need to return true for successfully execution.

Here i have taken Local Notification to handle the request.

You have to define this “shortcutsearchtap” in your start viewcontroller in ViewDidload Method.

In Our Case i have start viewcontroller is ViewController.swift class.

 

if you have any suggestion or issues feel free to ask . in next update of Blog , we will introduce how to update the Application shortcut & Add new One on run time as well as how to handle when the Application is kill.

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.

Osama
Talk to Sales

Global

Live Chat
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home