feat(debug): debug-page in TestFlight via EXPO_PUBLIC_ENABLE_DEBUG flag

debug.tsx war hart __DEV__-gated → der Protection-Log-Viewer (v0.3.3)
wäre im TestFlight-Build unerreichbar gewesen.

eas.json production-Profil setzt jetzt EXPO_PUBLIC_ENABLE_DEBUG=1.
debug.tsx + HeaderDropdownMenu prüfen `__DEV__ || EXPO_PUBLIC_ENABLE_DEBUG`.
Für den echten App-Store-Release einfach das Flag aus eas.json nehmen.
This commit is contained in:
chahinebrini 2026-05-20 05:42:00 +02:00
parent 5a44b8162e
commit ea152a9169
3 changed files with 15 additions and 5 deletions

View File

@ -25,13 +25,20 @@ export default function DebugScreen() {
const colors = useColors(); const colors = useColors();
const { me } = useMe(); const { me } = useMe();
// Debug-Page ist in __DEV__ immer da, plus in TestFlight/production-Builds
// wenn EXPO_PUBLIC_ENABLE_DEBUG gesetzt ist (eas.json production-Profil) —
// damit Tester den Protection-Log-Viewer ohne Mac/Console.app nutzen können.
// Für den echten App-Store-Release das Flag aus eas.json nehmen → wieder dicht.
const debugAccessible =
__DEV__ || process.env.EXPO_PUBLIC_ENABLE_DEBUG === '1';
useEffect(() => { useEffect(() => {
if (!__DEV__) { if (!debugAccessible) {
router.replace('/'); router.replace('/');
} }
}, [router]); }, [router, debugAccessible]);
if (!__DEV__) { if (!debugAccessible) {
return <View style={{ flex: 1, backgroundColor: colors.bg }} />; return <View style={{ flex: 1, backgroundColor: colors.bg }} />;
} }

View File

@ -68,7 +68,9 @@ export function HeaderDropdownMenu({ visible, onClose, topOffset = 80 }: Props)
}, },
]; ];
if (__DEV__) { // Debug-Eintrag: __DEV__ immer, plus TestFlight/production-Builds wenn
// EXPO_PUBLIC_ENABLE_DEBUG gesetzt ist (eas.json production-Profil).
if (__DEV__ || process.env.EXPO_PUBLIC_ENABLE_DEBUG === '1') {
items.push({ items.push({
key: 'debug', key: 'debug',
label: t('headerMenu.debug'), label: t('headerMenu.debug'),

View File

@ -34,7 +34,8 @@
}, },
"production": { "production": {
"env": { "env": {
"EXPO_PUBLIC_API_URL": "https://staging.rebreak.org" "EXPO_PUBLIC_API_URL": "https://staging.rebreak.org",
"EXPO_PUBLIC_ENABLE_DEBUG": "1"
}, },
"ios": { "ios": {
"resourceClass": "m-medium", "resourceClass": "m-medium",