I am trying to open a deep link from my today's extension widget to my main application with no luck.
public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
let url = URL(string: "ACTION_TODAY://")
self.extensionContext?.open(url!, completionHandler: { (completed) in
})
}
Info.plist of the main application: (I think it is ACTION_TODAY://not needed, but only ACTION_TODAYgives me the same result)

func application(_ application: UIApplication, open url: URL,
sourceApplication: String?, annotation: Any) -> Bool {
let action_today = "ACTION_TODAY://"
if url.absoluteString.contains(action_today) {
return true
}
return false
}
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
let action_today = "ACTION_TODAY://"
if url.absoluteString.contains(action_today) {
return true
}
return false
}
When I select one of the items in the View collection displayed in today's extension, the console gives me __55-[_NCWidgetExtensionContext openURL:completionHandler:]_block_invoke failed: Error Domain=NSOSStatusErrorDomain Code=-50 "(null)"
source
share