Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {formatBytesBase10} from 'sentry/utils/bytes/formatBytesBase10';
import {formatPercentage} from 'sentry/utils/number/formatPercentage';
import useOrganization from 'sentry/utils/useOrganization';
import {openAlternativeIconsInsightModal} from 'sentry/views/preprod/buildDetails/main/insights/alternativeIconsInsightInfoModal';
import {openMainBinaryExportedSymbolsModal} from 'sentry/views/preprod/buildDetails/main/insights/mainBinaryExportedSymbolsModal';
import {openMinifyLocalizedStringsModal} from 'sentry/views/preprod/buildDetails/main/insights/minifyLocalizedStringsModal';
import {openOptimizeImagesModal} from 'sentry/views/preprod/buildDetails/main/insights/optimizeImagesModal';
import {openStripDebugSymbolsModal} from 'sentry/views/preprod/buildDetails/main/insights/stripDebugSymbolsModal';
Expand Down Expand Up @@ -45,6 +46,7 @@ const INSIGHTS_WITH_MORE_INFO_MODAL = [
'image_optimization',
'webp_optimization',
'alternate_icons_optimization',
'main_binary_exported_symbols',
'localized_strings_minify',
'strip_binary',
];
Expand Down Expand Up @@ -91,6 +93,8 @@ export function AppSizeInsightsSidebarRow({
insight.key === 'webp_optimization'
) {
openOptimizeImagesModal(platform);
} else if (insight.key === 'main_binary_exported_symbols') {
openMainBinaryExportedSymbolsModal();
} else if (insight.key === 'localized_strings_minify') {
openMinifyLocalizedStringsModal();
} else if (insight.key === 'strip_binary') {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import {openInsightInfoModal} from 'sentry/actionCreators/modal';
import {Flex} from 'sentry/components/core/layout';
import {Text} from 'sentry/components/core/text';
import {t, tct} from 'sentry/locale';
import {InlineCode} from 'sentry/views/preprod/buildDetails/main/insights/insightInfoModal';

function getMainBinaryExportedSymbolsContent() {
return (
<Flex direction="column" gap="2xl">
<Flex direction="column" gap="xl">
<Flex direction="column" gap="md">
<Text>
{t(
'Binaries that act as entrypoints for your app, such as your main app binary or watchOS app binary, are not linked against by other binaries. This means the export trie information is unnecessary and can be removed.'
)}
</Text>
<Text>
{t(
'You can maintain a minimal allowlist so only required entry points stay exported:'
)}
</Text>
</Flex>

<Flex direction="column" gap="md">
<ol>
<li>
<Text>
{tct('Create a text file in your project, for example [path]', {
path: <InlineCode>Config/ExportedSymbols.txt</InlineCode>,
})}
</Text>
</li>
<li>
<Text>
{tct('Add [main] on its own line', {
Copy link
Contributor

@NicoHinderling NicoHinderling Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this line in the instructions is a bit too vague? maybe im dumb

main: <InlineCode>_main</InlineCode>,
mh: <InlineCode>__mh_execute_header</InlineCode>,
dlsym: <InlineCode>dlsym</InlineCode>,
})}
</Text>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Bug

The tct call for adding symbols defines mh and dlsym in its interpolation object, but the template string only references [main]. This causes __mh_execute_header and dlsym to not be displayed, making the user instructions incomplete.

Fix in Cursor Fix in Web

</li>
<li>
<Text>
{t('If you rely on other dynamic lookups, list those symbols too')}
</Text>
</li>
<li>
<Text>
{tct('In Xcode, set [setting] to the new file’s path', {
setting: (
<strong>
{t('Build Settings → Linking → Exported Symbols File')}
</strong>
),
})}
</Text>
</li>
</ol>
<Text>{t('Xcode will now limit the export trie to just that allowlist.')}</Text>
</Flex>
</Flex>
</Flex>
);
}

export function openMainBinaryExportedSymbolsModal() {
openInsightInfoModal({
title: t('Main binary export metadata'),
children: getMainBinaryExportedSymbolsContent(),
});
}
Loading