Is it possible to tell in your code if the app was launched from an app intent action in a widget.
In my SwiftUI code it has something like Button(intent: MyIntent()) I want to be able to tell when the user has clicked on the button to launch the app, because I need some different setup code to run before the intent perform method is called.
Thanks
Try it and examine the launch options in didFinishLaunchingWithOptions to see if there's anything there. If not then if you widget gets the chance to, then it could write a flag to group defaults which the app reads on launch.