ios - URL Scheme 有时会在应用后启动 App Store
问题描述
我在我的应用程序 url 方案中使用,但我不知道为什么有时当我单击 URL(例如 https://api.domain.com/menu?id=7ee5232764-0a79-4afe)时,iOS 会打开我的应用程序(正确)并且1 秒后打开 App Store 应用程序(不正确)。这是我的 openUrl 的方法:
func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:] ) -> Bool {
let components = url.absoluteString.components(separatedBy: "/")
if components.contains("menus") {
let menuId = url.lastPathComponent
let menu = Menu(id: menuId)
SessionManager.shared.navigationManager.present(NavigationItem.menu(menu: menu).viewController, animated: true, completion: nil)
return true
} else {
return false
}
}
解决方案
解决!错误出现在 web 端,他们激活了一个 JS 超时,在打开应用程序后他们不会停止。
推荐阅读
- javascript - 显示具有显示属性但默认隐藏的 div
- python - 无法安装 tensorflow 以与 anaconda 分发 spyder ide 一起使用,并出现以下错误
- python - 如何将二元组列出熊猫
- ruby-on-rails - 开始使用变体后,活动存储在 localhost 上不起作用
- ocaml - OCaml:沙丘缺少库,opam 说它在那里
- cplex - 错误:cplex(默认)无法提取表达式;OPL 无法提取表达式并更改界面语言
- function - PowerShell 将多个参数传递给类方法失败
- python - 熊猫数据框重定向
- apache-kafka - Apache Nifi Kafka时间戳创建问题
- python - 通过 IIS 的 Flask 将进入休眠状态