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 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
In this blog, we are going to talk about UIApplicationShortcutItem. It specifies a user-initiated action for your application. It was introduced in iOS 12 and is also known as Home Screen Dynamic Quick Action. This works by 3D touching of your application or by long-pressing the app on the menu page. There are 2 ways in which you can add UIApplicationShortcutItem to your application. Let’s see each way one by one.
1. Static Type
We can add a static shortcut via Info.plist file in the application. First, open the Info.plist file and add a new key with name UIApplicationShortcutItems and make its type to array. Then add an item to this array “Item 0” and make it type to be dictionary type. Now, add below mentioned 3 keys with String data type.
Info.plist
UIApplicationShortcutItems
array
dictionary
String
UIApplicationShortcutItemIconType
UIApplicationShortcutIconTypeCompose
UIApplicationShortcutIconTypePlay
UIApplicationShortcutIconTypeSearch
UIApplicationShortcutIconTypeLove
UIApplicationShortcutIconTypeShare
UIApplicationShortcutIconTypeAlarm
UIApplicationShortcutItemTitle
UIApplicationShortcutItemType
2. Dynamic Type
We can add dynamic type shortcuts by code. For this, you need to assign a list of UIApplicationShortcutItem to UIApplication.shared.shortcutItems .
UIApplicationShortcutItem
UIApplication.shared.shortcutItems
For handling Quick Action we need to check the launchOptions dictionary of didFinishLaunchingWithOptions method.
launchOptions
didFinishLaunchingWithOptions
Thank you for reading this article. After that, if you want to read more articles regarding iOS DevelopmentĀ click here.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
It was a successful collaboration. The Mobikul team provided the client everything they needed in a timely and high-quality manner. They were very professional, reliable, and accessible during the entire process. The client also saw no room for any improvements in the vendor's performance.
Vincenzo Carrano
Administrator, Segshop
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.