BatchBuild.BuildiOS C# (CSharp) Method

BuildiOS() private static method

private static BuildiOS ( GameType, type, bool release, bool append ) : bool
type GameType,
release bool
append bool
return bool
    private static bool BuildiOS(GameType type, bool release, bool append)
    {
        Debug.Log("Start Build( iOS )");
        BuildOptions opt = BuildOptions.None;
        if (append) {
            opt |= BuildOptions.AcceptExternalModificationsToPlayer;
        }
        if ( release == false ) {
            opt |= BuildOptions.SymlinkLibraries|BuildOptions.Development|BuildOptions.AllowDebugging;
        }

        string[] targetScene = null;
        string dirName = "";
        string bundleIdentifier = "";

        switch (type)			// add this other type
        {
            case GameType.Sample:
                targetScene = scene_sample;
                if (release) {
                    dirName = "iOS_Sample_Release";
                    bundleIdentifier = "me.seiji.sample.release";
                } else {
                    dirName = "iOS_Sample_Debug";
                    bundleIdentifier = "me.seiji.sample.debug";
                }
                break;
        }
        // PlayerSettings
        PlayerSettings.bundleIdentifier = bundleIdentifier;

        string errorMsg = BuildPipeline.BuildPlayer(targetScene,dirName,BuildTarget.iPhone,opt);
        if ( string.IsNullOrEmpty(errorMsg) ) {
            Debug.Log("Build( iOS ) Success.");
            return true;
        }
        Debug.Log("Build( iOS ) ERROR!");
        Debug.LogError(errorMsg);
        return false;
    }