Add macOS 26 icon for RNDT (#57310)

Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57310

Add `AppIcon.icon` file (Icon Composer) for macOS 26 Tahoe. Also rename previous `.icns` file for consistency.

`electron/packager` is updated to `^20.0.0` (`.icon` support was added in `18.4.0`).

**Notes**

- This change ensures the Icon Composer source is part of the codebase (following above Electron packager support which came in March).

Changelog:
[General][Changed] - **React Native DevTools**: Add macOS 26/27 app icon

Reviewed By: robhogan

Differential Revision: D97292364

fbshipit-source-id: ba1c34175a95da8c2860142d9db0c4d98d3f6de0
This commit is contained in:
Alex Hunt authored and meta-codesync[bot] committed 2026-06-29 03:08:17 -07:00
1 parent eec26421ff
commit fa371d156d
8 files changed
+264 -376

No files matched your search

+53 -25
View File
@@ -45,6 +45,28 @@ const PACKAGE_ROOT = path.join(
'packages',
'debugger-shell',
);
const ICON_BASE = path.join(PACKAGE_ROOT, 'src/electron/resources');
const platformConfigs = [
{
platform: ['darwin'],
arch: ['x64', 'arm64'],
icon: [
path.join(ICON_BASE, 'AppIcon.icns'),
path.join(ICON_BASE, 'AppIcon.icon'),
],
},
{
platform: ['win32'],
arch: ['x64', 'arm64'],
icon: path.join(ICON_BASE, 'icon.ico'),
},
{
platform: ['linux'],
arch: ['x64', 'arm64'],
icon: path.join(ICON_BASE, 'icon.png'),
},
];
async function main() {
const pkg = JSON.parse(
@@ -73,31 +95,37 @@ async function main() {
await writeBuildInfo();
await packager({
dir: PACKAGE_ROOT,
icon: path.join(PACKAGE_ROOT, 'src/electron/resources/icon'),
platform: ['win32', 'darwin', 'linux'],
arch: ['x64', 'arm64'],
name: APP_NAME,
appVersion: pkg.version,
appCopyright: COPYRIGHT,
appCategoryType: 'public.app-category.developer-tools',
asar: true,
appBundleId: APP_BUNDLE_IDENTIFIER,
out: path.join(PACKAGE_ROOT, 'build'),
win32metadata: {
CompanyName: COMPANY_NAME,
ProductName: APP_NAME,
InternalName: APP_NAME,
FileDescription: `${APP_NAME}.exe`,
OriginalFilename: `${APP_NAME}.exe`,
},
overwrite: true,
ignore: [
...IGNORE_PREFIXES.map(prefix => new RegExp('^' + escapeRegex(prefix))),
...IGNORE_FILES.map(file => new RegExp('^' + escapeRegex(file) + '$')),
],
});
await Promise.all(
platformConfigs.map(platformConfig =>
packager({
...platformConfig,
dir: PACKAGE_ROOT,
name: APP_NAME,
appVersion: pkg.version,
appCopyright: COPYRIGHT,
appCategoryType: 'public.app-category.developer-tools',
asar: true,
appBundleId: APP_BUNDLE_IDENTIFIER,
out: path.join(PACKAGE_ROOT, 'build'),
win32metadata: {
CompanyName: COMPANY_NAME,
ProductName: APP_NAME,
InternalName: APP_NAME,
FileDescription: `${APP_NAME}.exe`,
OriginalFilename: `${APP_NAME}.exe`,
},
overwrite: true,
ignore: [
...IGNORE_PREFIXES.map(
prefix => new RegExp('^' + escapeRegex(prefix)),
),
...IGNORE_FILES.map(
file => new RegExp('^' + escapeRegex(file) + '$'),
),
],
}),
),
);
}
async function writeBuildInfo() {