Search code examples
iosswiftopenurl

Open default Reminder app programatically


I'm trying to open iOS reminder app on button click.

@IBAction private func btnReminderTapped(_ sender: UIButton){
    
    if let url = URL(string: "x-apple-reminder://"), UIApplication.shared.canOpenURL(url) {
        UIApplication.shared.open(url, options: [:]) { (isDone) in
            
        }
    }
}

Which I click on button in console I see the following log:

-canOpenURL: failed for URL: "x-apple-reminder://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

How can I open the reminder app programatically?


Solution

  • Change url to x-apple-reminderkit://