Hi everyone,
i would ask if i'm the only one, that can't turn on the GameCenter capability in Xcode 10.0.
This is the PostProcess script i made.
[PostProcessBuild(999)]
public static void AddCapabilities(BuildTarget buildTarget, string pathToBuiltProject)
{
if (buildTarget == BuildTarget.iOS)
{
string projPath = pathToBuiltProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
PBXProject proj = new PBXProject();
proj.ReadFromString(File.ReadAllText(projPath));
string target = proj.TargetGuidByName("Unity-iPhone");
bool gameCenterCapability = proj.AddCapability(target, PBXCapabilityType.GameCenter);
bool inAppPurchaseCapability = proj.AddCapability(target, PBXCapabilityType.InAppPurchase);
Debug.Log(string.Format("Sgame Post Process - Capabilities - GameCenter: {0} - InAppPurchase: {1}",
gameCenterCapability,
inAppPurchaseCapability));
File.WriteAllText(projPath, proj.WriteToString());
}
}
In App purchase capability turn on, but GameCenter not.
I'm currently using Unity 2018.1.9f2
↧