iosreact-nativeexpoapple-app-site-associationaasa

Apple App Site Association (AASA) file is not being updated on app-site-association.cdn-apple.com


My app has three separate environments named

  1. int
  2. sbx
  3. prod

Here are my three AASA files on my webservers.

  1. https://app.int.croissant.com/.well-known/apple-app-site-association
  2. https://app.sbx.croissant.com/.well-known/apple-app-site-association
  3. https://app.croissant.com/.well-known/apple-app-site-association

Here are the same three AASA files on Apple's CDN

  1. https://app-site-association.cdn-apple.com/a/v1/app.int.croissant.com
  2. https://app-site-association.cdn-apple.com/a/v1/app.sbx.croissant.com
  3. https://app-site-association.cdn-apple.com/a/v1/app.croissant.com

I have two questions.

  1. How can I invalidate the Apple CDN so that my new AASA files are pulled in?
  2. Do my new AASA files look like they will support all possible paths? Does * capture any path e.g., /collection/123, /wallet/oauth?code=123, /sign-in

I've done the generic Googling and docs reading around this. I can't seem to find anything specifically related to Apple's CDN.


Solution

  • Updating my AASA file's Cache-Control header to no-cache fixed this for me.

    I use Next.js, so here is my next.config.js that fixed this for me.

     {
        source: "/.well-known/apple-app-site-association",
        headers: [
          { key: "Content-Type", value: "application/json" },
          { key: "Cache-Control", value: "no-cache" },
        ],
      },