Unity技术分享unity3D技术分享Unity教程合集

Unity Xcode API设置DevelopmentTeam

2017-01-09  本文已影响443人  2b75747cf703
            var pbxProject = new PBXProject();
            pbxProject.ReadFromFile("project.pbxproj");

            var pbxProjectData = pbxProject.GetFieldValue("m_Data");

            var project = pbxProjectData.GetFieldValue("project").GetPropertyValue("project");

            var properties = pbxProjectData.GetFieldValue("project").GetPropertyValue("project").GetFieldValue("m_Properties") as PBXElementDict;

            var targetGuid = pbxProject.TargetGuidByName("Unity-iPhone");

            var targetAttributes = properties["attributes"]["TargetAttributes"][targetGuid];
            if (targetAttributes == null)
                targetAttributes = properties["attributes"]["TargetAttributes"].AsDict().CreateDict(targetGuid);

            targetAttributes.AsDict().SetString("DevelopmentTeam", "AMSTN4PRF9");
            targetAttributes.AsDict().SetString("ProvisioningStyle", "Automatic");

            pbxProject.WriteToFile("project.pbxproj");
上一篇 下一篇

猜你喜欢

热点阅读