Search code examples
iosaemios-universal-app

What is the best practice in creating apple-app-site-association file in aem


What is the industry practice in generating apple-app-site-association file in AEM?

  1. Write a sling servlet that will generate the JSON (with env specific entries)
  2. Create static jsons (e.g. "apple-app-site-association.prod.json" and "apple-app-site-association.qa.json") and write Apache rewrite rules to pick right file based of env.

We have environment specific requirement to populate different appId for QA, UAT and Prod. And the appId is dynamic potential to change in future. With this, what is the suggested approach to publish the json file?

Or is there a better option that we are not foreseeing.


Solution

  • I finished this with option 1. Created a sling servlet generating the json. Reason is, the appId is dynamic (different for QA, QP and Prod) and this appId is being populated as meta tag on all templates. Hence created a sling servlet, added appId as component property and referenced from templates.