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 PostProcessBuild
but I can't figure this
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);
}
}
cs mProject.AddCapability(mTargetGUID, PBXCapabilityType.AssociatedDomains, entitlementsFileName);
– Zeralda