I\'ve implemented a Today widget for my application +Quotes which displays the day\'s quote within the notification center with the help of these Apple Docs. What I\'d like
Just in case, here's the version for Swift 3 with the error handling version:
let myAppUrl = URL(string: "main-screen:")!
extensionContext?.open(myAppUrl, completionHandler: { (success) in
if (!success) {
print("error: failed to open app from Today Extension")
}
})
To make it work you need to open Application's info.plist (open as source code) and in the very top, after this
add the following, so the App will know which URLs it should handle Here's the complete example of how to open the containing app and share User Defaults between app and Extension.