Search code examples
androidiosandroid-manifesthttp-redirectinfo.plist

Redirect from webpages without modifying the app's code


Is there anyway to direct users to mobile applications without modifying the mobile application?


Solution

  • FOR iOS

    The answer is YES. you can open app without change the app's code. But It's not mean you can do it without change app's configuration.

    There is no public api that you can use for this. But it's not so hard to make it available and if you just want to open the app, there is no coding required. Just a simple tag in info.plist do the trick:

    enter image description here

    Project -> Target -> Info -> URL Type -> URL Scheme = domain (could replace with anything you prefer)

    Now application will open by calling domain:// as link

    FOR Android

    There is a similar flow and you should add URLs list to app's manifest like this:

    <intent-filter>
      ...
      <data android:scheme="https" android:host="www.example.com" />
      <data android:scheme="app" android:host="open.my.app" />
    </intent-filter>
    

    It might seem as though this supports only https://www.example.com and app://open.my.app. However, it actually supports those two, plus these: app://www.example.com and https://open.my.app.

    you can read this documentation for more details.