【问题标题】:I am getting URL schemes error while archiving my iOS app归档 iOS 应用程序时出现 URL 方案错误
【发布时间】:2016-12-20 02:36:07
【问题描述】:

这是错误 -

在您的应用中找到的以下 URL 方案的格式不正确。有关详细信息,请参阅 RFC1738。

这是我的代码 -

@IBAction func webdropbox1(_ sender: Any) {
    let safariVC = SFSafariViewController(url: NSURL(string: "www.dropbox.com")! as URL)
    self.present(safariVC, animated: true, completion: nil)
    safariVC.delegate = self
}

我还把 URL 添加到我的 info.plist 文件中 -

Info.plist 文件截图:

【问题讨论】:

    标签: ios xcode url-scheme sfsafariviewcontroller


    【解决方案1】:

    URL scheme 是冒号前的部分:http、https、ftp、mailto、file 等

    www.dropbox.com 不是 URL 方案。它甚至不是一个有效的 URL。

    你有两个问题。

    1. 您的 Info.plist 需要更新以指定实际有效的方案,而不是部分 URL。
    2. 您创建 Dropbox URL 的代码需要使用“https://www.dropbox.com”。

    【讨论】:

    • 定义“无效”。它到底是在什么方面不起作用?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-04-04
    • 1970-01-01
    • 1970-01-01
    • 2011-08-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多