I have recently updated xcodeAPI from the older version provided by one signal to the latest version provided by unity on bitbucket.
This new version added support for Capabilities (setting push notification, In app Purchase, etc... programatically).
I am now running into problems getting App Group setup programatically, something that was working just fine in the older version of xcodeAPI.
In my PostProcessBuild function, amongst setting up all the other PBXProject option I do:
ProjectCapabilityManager projectManager = new ProjectCapabilityManager(projectPath, entitlementsPath, targetGuid);
PBXProject.AddCapability(targetGuid, PBXCapabilityType.AppGroups)
projectManager.AddAppGroups(new string[] {"group.my_company.onesignal"});
it used to work on the one signal postprocessbuild with this code:
if (entitlements.root["com.apple.security.application-groups"] == null)
{
var groups = entitlements.root.CreateArray("com.apple.security.application-groups");
groups.AddString("group." + PlayerSettings.applicationIdentifier + ".onesignal");
}
That is not working, I am not sure what I am missing. I am assuming that the new xcodeAPI works differently, but there is very little example on how to use it.
↧