iOS - Open an app with a URL Scheme from Chrome

前端 未结 3 2016
暖寄归人
暖寄归人 2021-01-04 05:11

I\'ve read many many blogs and examples of how to open an app from an URL scheme (for example, this blog), and it seems to work great when I call my app from

相关标签:
3条回答
  • 2021-01-04 05:45

    Due to the way that the Chrome app appears to be developed, it doesn't seem this is possible at present without a jailbreak (and even then, not easily). You should go bug the Google Chrome iOS team to fix this (e.g. try to open in all registered apps with URL schemes before googling). Sorry I couldn't be of more use, but there just doesn't seem to be an easy way around it.

    0 讨论(0)
  • 2021-01-04 05:47

    We can simply open the deep link using JavaScript which works fine in both chrome and safari in iOS. If you want to achieve the custom url scheme using JavaScript you can use the below code: document.location = "testapp://"

    0 讨论(0)
  • 2021-01-04 06:05

    There is a complex workaround, but you're probably not going to be too excited about building it as it involves hosting a web server to dynamically generate pages with the appropriate redirect. This is a over-simplified representation of what we built at Branch. This includes some code to get you started though the web server will require a bit of setup not described here.

    1. instead of testapp://some.data.here, you'll link to http://yoursite.com/hosted-redirect/some.data.here.

    2. your server should listen at the route /hosted-redirect, grab some.data.here and build the following page (body here):


    (source: derrrick.com)

    So your server will have to generate and respond with this page, filling in some.data.here, anytime http://yoursite.com/hosted-redirect/some.data.here is requested.

    A lightweight node app could do this with a single file.

    I just tested a static file for one of my apps and this definitely works.

    0 讨论(0)
提交回复
热议问题