Search code examples
iosflutterhttp-redirectpathdeep-linking

Flutter Deeplinking issue in iOS


While hit the url from browser it directly open the APP. We have created webview on domain side that first verify the user and then press the button, after pressing the button user have to navigate to the app by using pathprefix but pathprefix is not working it directly open the app which is not correct!

I have configure the deeplinking on APP side.

And I have set the apple-app-site-association file as


{
  "applinks": {
      "apps": [],
      "details": [
      {
        "appID": "S*****3.com.example.deeplink",
        "paths": ["*", "NOT /verify-email/*"]
      }
    ]
  }
}

But still not working. I need to navigate user from website though pathprefix to APP. I jusdt need to navigate the urls that ends with /login and /job only.


Solution

  • In the following solution NOT* means it will not route all the path, It will only route the path end with /login or contain /login and /job, /* means the path contains defined keys, like www.abc.com/login/a*****.

    {
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "TEAMID.APP-BundleID",
                "paths": ["/login","/login/*", "/job/*", "NOT *"]
            }
        ]
    }
    

    }

    By this, you can navigate to the app by hitting direct links like: www.abc.com/login or www.abc.com/login/b***** or www.abc.com/job/c*****

    if you hit this URL on the browser there will be a top banner of that app suggesting you open it. Popup for open App

    NOTE: After updating the apple-app-site-association file it may take 24 to 48 hours to render the changes and you need to clear the Safari cache before using deep linking.