41

Other than the first initial install of the app, does the apple-app-site-association json file ever get updated?

For example, if I add an additional value to the path array in the json file, will my app ever get that update?

Hamish
  • 78,605
  • 19
  • 187
  • 280
wolfprogrammer
  • 574
  • 6
  • 14

2 Answers2

49

My own experience indicates the apple-app-site-association file is checked when the app is first installed, and then rechecked during any later app updates from the App Store. So if you add an additional path to the file, it would be detected when the next update app is released but likely not before.

Note: if you're testing locally, you need to completely delete the app before reinstalling. Except for App Store updates, it appears the apple-app-site-association is not rechecked if the app is already on your device.

Alex Bauer
  • 13,147
  • 1
  • 27
  • 44
  • 1
    What does "testing locally" mean in this context? Thanks – micmdk May 18 '16 at 08:35
  • 3
    @micmdk it means if you're building the app on Xcode and installing it directly onto the device, instead of downloading from the App Store or from TestFlight/Fabric/Hockey, etc. I do actually sometimes see this work without needing to completely delete the app first, but the safest option is still to delete if you want to be absolutely certain! – Alex Bauer May 18 '16 at 14:39
  • 9
    I actually had to delete the app, reboot the device (iPhone), and reinstall the app for it to recognize the new apple-app-site-association file. It was very frustrating because when I loaded the file in Safari, it showed the correct contents. Just deleting the app and rerunning it from Xcode (which downloaded it again to the device) didn't refresh the association file. – One In a Million Apps Oct 28 '19 at 15:47
  • 1
    Even after completely removing and rebooting my iPhone, I was only able to get `swcd` to refresh the `apple-app-site-association` file when I installed a Release build of my app using the Devices window. – Peter Kovacs Jun 26 '20 at 17:02
  • I'm not 100% sure, but I don't think reinstall is required. Of course Alex at Branch is an expert, but I believe Apple cache's this file on the CDN and decides when to grab it again from the app itself. You can see the file being downloaded into your app using Charles. However, it is unclear how often this happens. – Matt Hudson May 13 '21 at 14:54
  • Reboot (Erase all Setting) Simulator and it's updated. – Huynh Inc Dec 19 '22 at 04:53
4

According to https://developer.apple.com/documentation/xcode/supporting-associated-domains#Add-the-associated-domains-entitlement-to-your-app:

Apple’s content delivery network requests the apple-app-site-association file for your domain within 24 hours. Devices check for updates approximately once per week after app installation.

Trevor Dixon
  • 23,216
  • 12
  • 72
  • 109