/// <summary>
 ///   Initializes a new instance of the <see cref = "GenerateInfoPListTask" /> class.
 /// </summary>
 public GenerateInfoPListTask()
 {
     this.generator = new InfoPListGenerator();
 }
        /// <summary>
        ///   Creates the Info.plist file.
        /// </summary>
        /// <param name = 'monitor'>The progress monitor.</param>
        /// <param name = 'project'>The project.</param>
        /// <param name = 'configuration'>The configuration.</param>
        /// <param name = 'maker'>The bundle maker.</param>
        public static void CreateInfoPList(IProgressMonitor monitor, MonobjcProject project, ConfigurationSelector configuration, BundleMaker maker)
        {
            monitor.BeginTask (GettextCatalog.GetString ("Generating the Info.plist..."), 0);

            InfoPListGenerator pListGenerator = new InfoPListGenerator ();

            // If an Info.plist exists in the project then use it
            FilePath infoPListFile = project.BaseDirectory.Combine (Constants.INFO_PLIST);
            if (File.Exists (infoPListFile)) {
                pListGenerator.Content = File.ReadAllText (infoPListFile);
            }

            String mainAssembly = project.GetOutputFileName (configuration);
            Assembly assembly = Assembly.ReflectionOnlyLoadFrom (mainAssembly);
            AssemblyName assemblyName = assembly.GetName ();

            // TODO: Review to use new parameters
            pListGenerator.DevelopmentRegion = project.DevelopmentRegion;
            pListGenerator.ApplicationName = assemblyName.Name;
            pListGenerator.Identifier = project.BundleId;
            pListGenerator.Version = project.BundleVersion;
            pListGenerator.Icon = project.BundleIcon.IsNullOrEmpty ? null : project.BundleIcon.FileNameWithoutExtension;
            pListGenerator.MainNibFile = project.MainNibFile.IsNullOrEmpty ? null : project.MainNibFile.FileNameWithoutExtension;
            pListGenerator.TargetOSVersion = project.TargetOSVersion;
            pListGenerator.PrincipalClass = "NSApplication";
            pListGenerator.WriteTo (Path.Combine (maker.ContentsDirectory, Constants.INFO_PLIST));

            monitor.EndTask ();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="GenerateInfoPListTask"/> class.
 /// </summary>
 public GenerateInfoPList()
 {
     this.generator = new InfoPListGenerator();
     this.minRequiredOSVersion = MacOSVersion.MacOS106;
     this.DevelopmentRegion = "en";
 }