From bcc6e5cba18099dedd7686b2c7594be35dd20476 Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Mon, 11 May 2026 14:00:02 +0200 Subject: [PATCH] chore(android): versionCode 2, eas.json profiles, avatar PNG fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - app.config.ts: android.versionCode 2 (was 1) - eas.json: development/preview/production profiles, EXPO_PUBLIC_API_URL=staging, appVersionSource=local, autoIncrement=false - avatars: switch DiceBear endpoint /svg -> /png — RN can't decode SVG, Hero-Avatars rendered transparent/blank on Android Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/rebreak-native/app.config.ts | 1 + apps/rebreak-native/eas.json | 21 +++++++++++++++------ apps/rebreak-native/lib/avatars.ts | 4 +++- apps/rebreak-native/lib/resolveAvatar.ts | 3 ++- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/apps/rebreak-native/app.config.ts b/apps/rebreak-native/app.config.ts index 9e42fb8..89046ad 100644 --- a/apps/rebreak-native/app.config.ts +++ b/apps/rebreak-native/app.config.ts @@ -36,6 +36,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({ android: { package: "org.rebreak.app", + versionCode: 2, adaptiveIcon: { // Play-Console-Icon (rebreak_android.png) verwenden — wird durch Adaptive-Mask // gecropped (Kreis/Squircle), evtl. Edges leicht beschnitten je nach Design. diff --git a/apps/rebreak-native/eas.json b/apps/rebreak-native/eas.json index dd7ecd5..bd8ddeb 100644 --- a/apps/rebreak-native/eas.json +++ b/apps/rebreak-native/eas.json @@ -1,12 +1,15 @@ { "cli": { "version": ">= 5.0.0", - "appVersionSource": "remote" + "appVersionSource": "local" }, "build": { "development": { "developmentClient": true, "distribution": "internal", + "env": { + "EXPO_PUBLIC_API_URL": "https://staging.rebreak.org" + }, "ios": { "simulator": false }, @@ -16,24 +19,30 @@ }, "preview": { "distribution": "internal", + "env": { + "EXPO_PUBLIC_API_URL": "https://staging.rebreak.org" + }, "ios": { "resourceClass": "m-medium", - "autoIncrement": true + "autoIncrement": false }, "android": { "buildType": "apk", - "autoIncrement": true + "autoIncrement": false }, "channel": "preview" }, "production": { + "env": { + "EXPO_PUBLIC_API_URL": "https://staging.rebreak.org" + }, "ios": { "resourceClass": "m-medium", - "autoIncrement": true + "autoIncrement": false }, "android": { "buildType": "app-bundle", - "autoIncrement": true + "autoIncrement": false }, "channel": "production" } @@ -46,7 +55,7 @@ "appleTeamId": "84BQ7MTFYK" }, "android": { - "serviceAccountKeyPath": "", + "serviceAccountKeyPath": "", "track": "internal" } } diff --git a/apps/rebreak-native/lib/avatars.ts b/apps/rebreak-native/lib/avatars.ts index 9caf10d..6d3ba2e 100644 --- a/apps/rebreak-native/lib/avatars.ts +++ b/apps/rebreak-native/lib/avatars.ts @@ -5,7 +5,9 @@ export interface HeroAvatar { url: string; } -const DICEBEAR_BASE = 'https://api.dicebear.com/9.x/adventurer/svg'; +// PNG, not SVG — React Native's can't decode SVG (Hero-Avatars rendered +// blank/transparent on Android otherwise). DiceBear serves PNG at the /png path. +const DICEBEAR_BASE = 'https://api.dicebear.com/9.x/adventurer/png'; export const HERO_AVATARS: HeroAvatar[] = [ { id: 'spider', name: 'Spider', color: 'border-red-500', url: `${DICEBEAR_BASE}?seed=spiderman&backgroundColor=b71c1c` }, diff --git a/apps/rebreak-native/lib/resolveAvatar.ts b/apps/rebreak-native/lib/resolveAvatar.ts index 4b044b8..1394b79 100644 --- a/apps/rebreak-native/lib/resolveAvatar.ts +++ b/apps/rebreak-native/lib/resolveAvatar.ts @@ -1,6 +1,7 @@ import { getAvatarById, getAvatarUrl } from './avatars'; -const DICEBEAR_BASE = 'https://api.dicebear.com/9.x/adventurer/svg'; +// PNG, not SVG — RN can't decode SVG. DiceBear serves PNG at the /png path. +const DICEBEAR_BASE = 'https://api.dicebear.com/9.x/adventurer/png'; /** * Resolves the `profiles.avatar` field zu einer renderbaren URL.