Apple App Site Association
The Apple App Site Association file is integral for app developers and owners who want their iOS and iPadOS apps to support universal links. This file is a JSON document that helps establish a connection between your app and your website.
Structure of the File
The Apple App Site Association file must be served over HTTPS and should not have any file extension. The structure of the content is as follows:
{
"applinks": {
"apps": [],
"details": [
{
"appID": "TEAMID.com.example",
"paths": ["*"]
}
]
}
}
Components Description:
- apps: An array specifying the app identifiers.
- details: An array containing objects that describe your app's association with specific paths.
- appID: The unique identifier for your app.
- paths: An array of paths that your app can handle.
Serving the File
The app site association file should be placed at the root of your web server: https://yourwebsite.com/apple-app-site-association. Make sure to set the correct content type application/json for the file response.
Testing Your File
To verify that your app site association file is set up correctly, you can use the following command in your terminal:
curl -I https://yourwebsite.com/apple-app-site-association
Ensure that the status code returned is 200 and the content type is correct.
Conclusion
Implementing the Apple App Site Association file is a significant step for enabling universal links and ensuring a seamless experience for users transitioning between web and app.
This enhances the usability and promotes the integration of your app with your website's content.