I want the user to be able to tap on a lock-screen widget created by my app and deep link to my main app (eg, so that my main app can take some action) I have been able to do this with Home Widgets, but the same method does not work with the Lock Screen widgets in iOS 16.
Is this possible? Here is a code that works for Home Widgets:
Link(destination: myActionURL) {
Image("my_image").resizable(capInsets: EdgeInsets(), resizingMode: .stretch)
I was able to do this using
widgetURL. In the app delegate catch the url usingfunc applicationHandle(url: URL)and do the action based on the url.