title: Apple association file fetched in development but not in TestFlight and App Store
body: <p>Universal links work perfectly fine in development, but once I sign the applications and deploy them to TestFlight and App Store, it looks like the apple-app-site-association is not fetched and therefore the app isn't registered for oppening the universal links.</p>
  <p><strong>1.     /.well-known/apple-app-site-association</strong> file:</p>
  <pre class="lang-js prettyprint-override"><code>{  
    &quot;applinks&quot;: {  
    &quot;apps&quot;: [],  
    &quot;details&quot;: [{  
    &quot;appID&quot;: &quot;myteamid.com.mycompany.appName&quot;,  
    &quot;paths&quot;: [&quot;*&quot;]  
    }]  
    }  
  } 
  </code></pre>
  <p>The server part looks OK, since it is successfuly fetched whenever I run the app via the cable on my phone.</p>
  <p>App Search API Validation tool returns this for Link to application:</p>
  <p>Action required</p>
  <ul>
  <li>Could not extract required information for Universal Links. Learn how
  to implement the recommended Universal Links.</li>
  <li>Error no apps with domain entitlements</li>
  <li>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.</li>
  </ul>
  <p><strong>2) Capabilities:</strong></p>
  <p>Associated domains - ON with Domain list of:
  applinks: link.mycompany.com</p>
  <p>Other things I have turned on are: Push Notifications and Background Modes.</p>
  <p><strong>3) Provisioning profile:</strong>
  I created a new one after adding the Universal links and Push notifications and it includes:</p>
  <p><strong>Capabilities:</strong></p>
  <ul>
  <li><p>Associated Domains,</p>
  </li>
  <li><p>List item</p>
  </li>
  <li><p>Game Center,</p>
  </li>
  <li><p>In-App Purchase,</p>
  </li>
  <li><p>Keychain Sharing,</p>
  </li>
  <li><p>Push Notifications.</p>
  </li>
  </ul>
  <p>Entitlements:</p>
  <ul>
  <li><p>get-task-allow,</p>
  </li>
  <li><p>app-enviroment,</p>
  </li>
  <li><p>com.apple.developer.associated-domains,</p>
  </li>
  <li><p>com.apple.developer.team-identifier,</p>
  </li>
  <li><p>application-identifier,</p>
  </li>
  <li><p>beta-reports-active,</p>
  </li>
  <li><p>keychain-access-groups</p>
  </li>
  </ul>
  <p><strong>4) While installing the app,</strong> it behaves different in test flight then it does when loading via cable:</p>
  <ul>
  <li><p><strong>Via cable</strong> I can see the successfull http request for the apple-app-site-association file and finally form the process swcd: <strong>&quot;Added service 'applinks', appID 'myteamid.com.mycompany.appName', domain 'link.mycompany.com' &quot;</strong></p>
  </li>
  <li><p><strong>Test flight</strong> - when installing there is no sign of http request and the following line is shown if I previously had the app installed via cable: <strong>&quot;Removed service 'applinks', app ID 'myteamid.com.mycompany.appName', domain 'link.mycompany.com' (removed domain) &quot;</strong></p>
  </li>
  </ul>
  <p>This of course results in the fact that whenever I install the app via TestFlight or Describution, the Universal links do not work.</p>
  <p>Any ideas where it goes wrong?</p>