- Home /
 
 
               Question by 
               zullo91 · Sep 30, 2018 at 12:53 PM · 
                xcodepost processinggamecenterpostprocess  
              
 
              PostProcess Build Scripts / GameCenter Capability
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
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Post Processing v2 Volume has no effect 1 Answer
PostProcessBuild files fail 2 Answers
How to get quality Depth Of Field effect with Post Processing Stack V2? 1 Answer
Post Processing v2 make the effect visible only on certain layer objects 2 Answers
Enable Push Notification in XCode project by default? 2 Answers