Ejemplo n.º 1
0
        public PBXCopyFilesBuildPhase AddEmbedFrameworkBuildPhase()
        {
            PBXCopyFilesBuildPhase phase = null;

            PBXNativeTarget naviTarget = GetNativeTarget("Unity-iPhone");

            if (naviTarget == null)
            {
                Debug.Log("Not found Correct NativeTarget.");
                return(phase);
            }

            //check if embed framework buildPhase exist
            foreach (var currentObject in copyBuildPhases)
            {
                object nameObj = null;
                if (currentObject.Value.data.TryGetValue("name", out nameObj))
                {
                    string name = (string)nameObj;
                    if (name == "Embed Frameworks")
                    {
                        return(currentObject.Value);
                    }
                }
            }

            int buildActionMask = this.GetBuildActionMask();

            phase = new PBXCopyFilesBuildPhase(buildActionMask);
            var buildPhases = (ArrayList)naviTarget.data["buildPhases"];

            buildPhases.Add(phase.guid);            //add build phase
            copyBuildPhases.Add(phase);
            return(phase);
        }
Ejemplo n.º 2
0
        public PBXCopyFilesBuildPhase AddEmbedFrameworkBuildPhase()
        {
            PBXCopyFilesBuildPhase phase = null;

            PBXNativeTarget naviTarget = GetNativeTarget("Unity-iPhone");
            if (naviTarget == null)
            {
                Debug.Log("Not found Correct NativeTarget.");
                return phase;
            }

            //check if embed framework buildPhase exist
            foreach( var currentObject in copyBuildPhases )
            {
                object nameObj = null;
                if (currentObject.Value.data.TryGetValue("name", out nameObj))
                {
                    string name = (string)nameObj;
                    if (name == "Embed Frameworks")
                        return currentObject.Value;
                }
            }

            int buildActionMask = this.GetBuildActionMask();
            phase = new PBXCopyFilesBuildPhase(buildActionMask);
            var buildPhases = (ArrayList)naviTarget.data["buildPhases"];
            buildPhases.Add(phase.guid);//add build phase
            copyBuildPhases.Add(phase);
            return phase;
        }