【问题标题】:Open default Reminder app programatically以编程方式打开默认提醒应用程序
【发布时间】: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.)"

如何以编程方式打开提醒应用程序?

【问题讨论】:

    标签: ios swift openurl


    【解决方案1】:

    将网址更改为x-apple-reminderkit://

    【讨论】:

    • 这没有提供问题的答案。要批评或要求作者澄清,请在他们的帖子下方留下评论。 - From Review
    • @Panda 它怎么不提供问题的答案?
    • 它似乎回答了这个问题,但它可能会受益于为什么需要将kit 添加到末尾的一些解释。
    • 谢谢伙计。它的工作!我认为 Apple 在 url 方案中添加了 kit 后缀。
    猜你喜欢
    • 2021-02-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多