Home > Mobile >  Apple App Site Association not working if app is not installed
Apple App Site Association not working if app is not installed

Time:07-30

We've been testing our app and in development things were perfect regarding app association/deeplinking. We have our .well-known/apple-app-site-association working, validating, Branch.io's AASA validator passing with our domain team ID bundle combo. Of course there wasn't a way to test it live with App Store link until it was actually on App Store.

Today we've released our app, and realized that even when we go to our page which should be handled by the deep linking, the "top bar" (install/open link) wasn't being displayed. If we install the app, then the top bar displays with the "open" link but not having "install" button when app isn't installed is killing the whole purpose.

Apple's search validation tool however gives the following error for "Link to Application" section:

Error no apps with domain entitlements
The entitlement data used to verify deep link dual authentication is from the current released version of your app. This data may take 48 hours to update.

Here is what we have:

  • A correct, validating (through https://branch.io/resources/aasa-validator) AASA file in our .well-known directory with correct mime type, Team ID suffix, and bundle ID.
  • Our app, just published on the App Store
  • Apple's Search Validation Tool (https://search.developer.apple.com/appsearch-validation-tool/) telling that association is not found even though Branch.io's one doesn't complain.
  • Association working (top bar shown at paths that we defined) when app is installed, either through App Store, TestFlight, or manually from Xcode.
  • Association not working (top bar not shown at all as if AASA doesn't exist) when app is not installed.

We need to show the bar when app is not installed, too. Are we missing something or is it just a matter of time for Apple to index and map our App Store app and domain now?

CodePudding user response:

What you are looking for is a Smart banner.

To get this to appear you need to add some meta data to your web page.

<meta name="apple-itunes-app" content="app-id=myAppStoreID, app-argument=myURL">

There are two different processes at work in what you are trying to achieve:

  • When you install an app with an associated domains entitlement, iOS fetches the ASAA file from that domain and then uses that to direct requests to your app for matching URLs
  • When you don't yet have the app installed, Safari uses the meta data to offer the app to the user. Safari does not check every single domain that the user accesses for an ASAA file, so without the meta data you won't get the smart banner.
  • Related