Back in the days of NCWidgetProviding,
we had a button to open our app. We included code like the following in the app's info.plist:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.xxxx.yyyy/string>
<key>CFBundleURLSchemes</key>
<array>
<string>yyyy</string>
</array>
</dict>
</array>
and in the widget's button, we used code like:
let appURL = URL(string: "yyyy://?url=\(zzz)")
extensionContext?.open(appURL, completionHandler: nil)
How can I achieve the same result using WidgetKit? (I.e., sending a URI to my main app)?
The use case is that the widget displays a random record from a database and when the user taps on the widget, I want to open my app, displaying THAT SAME RECORD.
Thanks.