【发布时间】:2020-11-09 14:43:22
【问题描述】:
我正在尝试通过单击按钮打开 iOS 提醒应用。
@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
}
}
}
点击控制台中的按钮,我看到以下日志:
-canOpenURL: failed for URL: "x-apple-reminder://" - error: "The operation could not be completed. (OSStatus error -10814.)"
如何以编程方式打开提醒应用程序?
【问题讨论】: