I’m developing an iOS app and want to provide users with the ability to create custom shortcuts that can be accessed from the global Shortcuts app on their device. Is it possible for my app to dynamically add shortcuts to the global Shortcuts section? If so, what are the steps involved and are there any limitations or best practices to follow?
For example:
Like my user wants to create a shortcut clicking on which we can launch user specified url
Can this be used to achieve same:
https://developer.apple.com/documentation/appintents/appintent
2
Answers
I want to appear it here programmatically
Yes, you can use
AppIntent
along withAppShortcutsProvider
in order to create shortcuts for your app. This is a very good article to add shortcuts in iOS16:-https://medium.com/appcent/bring-shortcuts-support-to-your-ios-app-with-swiftui-ee35dc4bf551#:~:text=With%20iOS%2016%2C%20App%20Intents,it%20without%20causing%20any%20headaches.