feat(app-expo): env variants, local iOS prebuild, and About diagnostics

Align staging/production builds with APP_VARIANT bundle IDs, allow staging HTTP on iOS, add ios-prebuild scripts for TestFlight, and show connected API URL on About for non-production builds.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Kevin
2026-05-19 15:43:16 +08:00
parent 3921c5ec24
commit 6d281c92a5
13 changed files with 275 additions and 18 deletions

View File

@@ -0,0 +1,23 @@
import {
appVariant,
config,
shouldShowAboutBackendUrl,
type AppVariant,
} from '@/core/config';
describe('shouldShowAboutBackendUrl', () => {
it('shows backend URL for development and staging', () => {
expect(shouldShowAboutBackendUrl('development')).toBe(true);
expect(shouldShowAboutBackendUrl('staging')).toBe(true);
});
it('hides backend URL for production', () => {
expect(shouldShowAboutBackendUrl('production')).toBe(false);
});
it('matches config.showAboutBackendUrl for current build', () => {
expect(config.showAboutBackendUrl).toBe(
shouldShowAboutBackendUrl(appVariant as AppVariant),
);
});
});