Exemple #1
0
        public BuildPlayerOptions ModifyOptions(BuildPlayerOptions playerOptions)
        {
            if (CloudTestPipeline.IsRunningOnCloud())
            {
                playerOptions.options &= ~(BuildOptions.AutoRunPlayer);
#if UNITY_IOS
                playerOptions.locationPathName = CloudTestConfig.IOSBuildDir;
#else
                playerOptions.locationPathName = CloudTestConfig.BuildPath;
#endif

                return(playerOptions);
            }

            return(playerOptions);
        }
        public static void ChangeXcodePlist(BuildTarget buildTarget, string pathToBuiltProject)
        {
            // Adds UIFileSharingEnabled to Info.plist
            if (buildTarget == BuildTarget.iOS && CloudTestPipeline.IsRunningOnCloud())
            {
                // Get plist
                string        plistPath = pathToBuiltProject + "/Info.plist";
                PlistDocument plist     = new PlistDocument();
                plist.ReadFromString(File.ReadAllText(plistPath));

                // Get root
                PlistElementDict rootDict = plist.root;
                rootDict.SetBoolean("UIFileSharingEnabled", true);
                // rootDict.SetString("CFBundleDisplayName", "CloudBundle");
                // Write to Info.plist
                Debug.Log("Updating Info.plist");
                File.WriteAllText(plistPath, plist.WriteToString());
            }
        }