iOS 13 performActionFor shortcutItem doesn't get called in SceneDelegate now on launch, but does after app launches. Why?

900 Views Asked by At

performActionFor shortcutItem gets called in my SceneDelegate if the app has already launched, but it doesn't get called if the app actually launches from a shortcut item. Why is this?

1

There are 1 best solutions below

1
Thenappan Ramanathan On

You can get the ShortcutItems from willConnectTo function in sceneDelegate when the app is launched from shortcut item (and when there is no instance of app is in background)

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
if let shortcutItems = connectionOptions.shortcutItem{
    }
}