title: How to automatically set associated domain for iOS app using Unity
body: <p>I am developing an iOS application using Unity right now and I am trying to set the associated domain without manually setting it on xcode. I believe I can achieve this with <code>PostProcessBuild</code> but I can't figure this </p>
  
  <pre><code>public class AvametricIOSBuildPostProcessor
  {
  
      static string[] associatedDomains;
      [PostProcessBuild]
      public static void OnPostprocessBuild (BuildTarget target, string pathToBuiltProject)
      {
      if (target == BuildTarget.iOS)
          OnPostprocessBuildIOS (pathToBuiltProject);
      }
  
      private static void OnPostprocessBuildIOS (string pathToBuiltProject)
      {
  
         var projectCapabilityManager = new ProjectCapabilityManager(plistPath, plistPath, "Unity-iPhone");
         associatedDomains[0] = "applinks:XXXXX";
         projectCapabilityManager.AddAssociatedDomains(associatedDomains);
  
  
      }
  }
  </code></pre>