【问题标题】:URL Scheme sometime launch App Store after applicationURL Scheme 有时会在应用后启动 App Store
【发布时间】:2019-07-24 07:25:21
【问题描述】:

我在我的应用程序 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
    }
}

【问题讨论】:

  • 您是否在单击 url 时调用上述函数时添加了断点。
  • 他发布的网址是否只是为我打开了一个性链接?
  • 我不认为点击这个 xxx 是个好主意。 com 链接。
  • 我用“xxx”代替原来的链接。 @MandeepSingh 是的,我使用了断点,它在 if 中正确输入。

标签: ios swift url-scheme


【解决方案1】:

解决了!错误出现在 web 端,他们激活了 JS 超时,打开应用后不会停止。

【讨论】:

    猜你喜欢
    • 2016-09-25
    • 1970-01-01
    • 2014-11-14
    • 2015-11-20
    • 1970-01-01
    • 2023-04-08
    • 2018-12-26
    • 2015-03-01
    • 1970-01-01
    相关资源
    最近更新 更多