1

I using Universal-linking in my application, For that, I make the following apple-app-site-association file, like with the following code.

I place this file into server please find here:- http://dev.2ULaundry.com/apple-app-site-association

I add Domain URL into under associated domain into Capabilities of project file also.

But my Universal linking is not working anyone please help to me.

"applinks": {
        "apps": [],
        "details": [
            {
                "appID": "D929J2.com.apple.wwdc",
                "paths": [ "/scheduled-pickups/","/new-schedule/", "dashboard-1", "/refer-a-friend/", "/price-list/", "/give-a-gift/", "/locations", "2u-rewards/", "payments/"]
            }
        ] 
     }
 }

And add the following code into appdelegate file also for hadling.

    func application(_ application: UIApplication,
                         continue userActivity: NSUserActivity,
                         restorationHandler: @escaping ([Any]?) -> Void) -> Bool
        {
            if userActivity.activityType == NSUserActivityTypeBrowsingWeb {
                let url = userActivity.webpageURL!
                let userurl = url.absoluteString

                    if userurl.contains("/scheduled-pickups/")
                    {
                        let innerPage = UIStoryboard.loadPickupController()
                        innerPage.selectedfrom = SelectedFromVc.Deeplinking.rawValue
                        let nav = UINavigationController.init(rootViewController: innerPage)
                        nav.isNavigationBarHidden = true
                        self.window?.rootViewController = nav

                    }
}

2 Answers2

0

You should check is your domain valid for using universal links. You could do it here: https://branch.io/resources/aasa-validator/.

I've checked your domain http://dev.2ulaundry.com there and there are some issues with your domain. Fix them and it should be fine.

Kirill Kunst
  • 151
  • 1
  • 6
0

Before the implementation, you have to verify your website domain with this AASA validator https://branch.io/resources/aasa-validator/. It has few warnings so please run the validator and fix the issue.

As per you shared, the domain starts with "http" but

Universal link only serves "https"

and also it would be good if you are placing the AASA file in the below path

https://dev.2ulaundry.com/.well-known/apple-app-site-association

Since I spent lot of times on Universal link & App links, my recommendation is to use Firebase dynamic link for free or Branch.io before wasting your time.Universal link will create lot of issues like you can't check the app availability(app installed or not) and you can't passing the parameter via Apple/Play store.

  • You have duplicated my answer :) – Kirill Kunst Oct 24 '19 at 10:55
  • Cool dude, my point is to highlight the problems with the universal link. Even if he goes for Universal link those are all the basic validations. :-) – VasanthRavichandran Oct 24 '19 at 13:14
  • Hello RaviChandra thank you AASA file location path well-known is our own folder or must and should be name .well-known – Srikanth Thirumalasetty Oct 25 '19 at 04:19
  • You have to create the folder (name called .well-known) in your root directory and set the path as expected. For eg: in nginx server we are setting the path in default.config file like this "location /.well-known/apple-app-site-association { try_files $uri /.well-known/apple-app-site-association; }" – VasanthRavichandran Oct 29 '19 at 09:37