首页 > 解决方案 > 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
    }
}

标签: iosswifturl-scheme

解决方案


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


推荐阅读