Howto edit the Xcode project.pbxproj "SystemCapabilities" using Xcode manipulation API?

[Solved] I would like to add 2 capabilities to the generated Xcode project file in a postbuild step using the Unity Xcode manipulation API. More precisely I want the string

SystemCapabilities = {
com.apple.GameControllers.appletvos = {
enabled = 1;
};
};

to be converted to

SystemCapabilities = {
com.apple.GameCenter = {
enabled = 1;
};
com.apple.GameControllers.appletvos = {
enabled = 1;
};
com.apple.InAppPurchase = {
enabled = 1;
};
};

If this manipulation is not done, XCode 8.3.3 does not show these capabilities as enabled. I have managed to make all other needed project manipulations for GameCenter, iCloud, and InAppPurchases by using the API. However for editing SystemCapabilities I don’t see any API functionality (looking at the latest version on bitbucket too). So I have to directly replace the “SustemCapabilities” section in the string representation of the project file which is not future proof. Am I missing anything and if not, could you add this feature to the Unity Xcode manipulation API please?

I found the right code to use - ProjectCapabilityManager.cs in the bitbucket latest version.

@MariaAngelovaPD Could you please give me the steps on how to implement this? It would be a big help :slight_smile: