I have been attempting to implement a button to open my iOS app from its widget. I realize this issue has been beaten to death on the forums but I cannot find explanation with the specific error I am receiving. Perhaps some of you more experienced iOS developers can shed some light on this.
I am developing an update to one of my iOS apps for iOS 10 using XCode 8.1 and Swift 2.
Code for my widget's button:
URL scheme added to the widget's info.plist:
The runtime error I receive when pressing the OpenApp button:
AppWidget[11872:3577323] __55-[_NCWidgetExtensionContext openURL:completionHandler:]_block_invoke failed: Error Domain=NSOSStatusErrorDomain Code=-10814 "(null)"
// Note: app name has been substituted with appropriate generics.
I often find the OS Status lookup site pretty useful to infer details from errors. An OS error with code -10814
is a kLSApplicationNotFoundErr
, which describes the scenario when:
No application in the Launch Services database matches the input criteria.
It sounds like your application has not been properly registered with the system as a consumer of the URL scheme you are using. Have you double-double (double!) checked that the bundle identifier and URL scheme match? Have you verified that your app can be launched with the URL from Safari?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With