Repository: tauri-apps/tauri
File: crates/tauri-bundler/src/bundle/macos/app.rs (Rust)

Code before:
  plist.insert("CFBundleDisplayName".into(), settings.product_name().into());
  plist.insert(
    "CFBundleExecutable".into(),
    settings.main_binary_name()?.into(),
  );
  if let Some(path) = bundle_icon_file {
    plist.insert(
      "CFBundleIconFile".into(),
      path
        .file_name()
        .expect("No file name")
        .to_string_lossy()
        .into_owned()
        .into(),
    );
  }
  plist.insert(
    "CFBundleIdentifier".into(),
    settings.bundle_identifier().into(),
  );
  plist.insert("CFBundleInfoDictionaryVersion".into(), "6.0".into());
  if let Some(bundle_name) = settings.macos().bundle_name.clone() {
    plist.insert("CFBundleName".into(), bundle_name.into());
  } else {
    plist.insert("CFBundleName".into(), settings.product_name().into());
  }
  plist.insert("CFBundlePackageType".into(), "APPL".into());
  plist.insert(
    "CFBundleShortVersionString".into(),
    settings.version_string().into(),
  );
  plist.insert(
    "CFBundleVersion".into(),
    settings
      .macos()
      .bundle_version
      .as_deref()
      .unwrap_or_else(|| settings.version_string())
      .into(),
  );
  plist.insert("CSResourcesFileMapped".into(), true.into());
  if let Some(category) = settings.app_category() {
    plist.insert(
      "LSApplicationCategoryType".into(),
      category.macos_application_category_type().into(),
    );
  }
  if let Some(version) = settings.macos().minimum_system_version.clone() {
    plist.insert("LSMinimumSystemVersion".into(), version.into());
  }


Review comment (suggestion):
This code can be "simplified" (not really simpler) to how it was done for CFBundleVersion below so like this
```suggestion
  plist.insert(
    "CFBundleName".into(),
    settings
      .macos()
      .bundle_name
      .as_deref()
      .unwrap_or_else(|| settings.product_name())
      .into(),
  );
```

Code after:
  plist.insert("CFBundleDisplayName".into(), settings.product_name().into());
  plist.insert(
    "CFBundleExecutable".into(),
    settings.main_binary_name()?.into(),
  );
  if let Some(path) = bundle_icon_file {
    plist.insert(
      "CFBundleIconFile".into(),
      path
        .file_name()
        .expect("No file name")
        .to_string_lossy()
        .into_owned()
        .into(),
    );
  }
  plist.insert(
    "CFBundleIdentifier".into(),
    settings.bundle_identifier().into(),
  );
  plist.insert("CFBundleInfoDictionaryVersion".into(), "6.0".into());
  if let Some(bundle_name) = settings
    .macos()
    .bundle_name
    .as_deref()
    .unwrap_or_else(|| settings.product_name())
    .into()
  {
    plist.insert("CFBundleName".into(), bundle_name.into());
  }
  plist.insert("CFBundlePackageType".into(), "APPL".into());
  plist.insert(
    "CFBundleShortVersionString".into(),
    settings.version_string().into(),
  );
  plist.insert(
    "CFBundleVersion".into(),
    settings
      .macos()
      .bundle_version
      .as_deref()
      .unwrap_or_else(|| settings.version_string())
      .into(),
  );
  plist.insert("CSResourcesFileMapped".into(), true.into());
  if let Some(category) = settings.app_category() {
    plist.insert(
      "LSApplicationCategoryType".into(),
      category.macos_application_category_type().into(),
    );
  }