chahinebrini b31066a04c feat(chat): native action sheet + Insta-style heart for DM messages
- ChatBubble: useActionSheet replaces custom Modal (native iOS popup, Android bottom sheet)
- DM mode (isDM prop): hides like-count, shows Insta-style heart badge under bubble when liked
- Group chat unchanged
- Cleanup: remove unused Modal/Platform imports, sheet styles, actionsOpen state
- deploy.sh: auto-detect ANDROID_HOME + auto-create local.properties for local Gradle
- NEXT_RELEASE.md: DM reactions release note
- Includes other staged work across binder-mac, marketing, ops/mdm, ios/
2026-05-30 09:14:32 +02:00

224 lines
5.9 KiB
Markdown

# ReBreak Native — Deploy & Dev Scripts
## Quick Start
### Development
```bash
# iOS Dev (Metro + Xcode):
./dev.sh ios
# iOS Dev auf physischem iPhone (USB):
./dev.sh ios --device
# iOS Dev auf iPhone via WiFi:
./dev.sh ios --wifi
# Android Dev:
./dev.sh android
# Nur Metro starten:
./dev.sh metro
# iOS Clean + Rebuild:
./dev.sh clean --build
# Release-Build auf iPhone installieren:
./dev.sh install ios
```
### Deployment
```bash
# Full Release (alle Plattformen):
./deploy.sh all --bump
# Nur iOS TestFlight:
./deploy.sh testflight --bump
# Nur iOS MDM (Ad-Hoc):
./deploy.sh mdm --bump
# Nur Android:
./deploy.sh android --bump
# Dry-Run zum Testen:
./deploy.sh all --bump --dry-run
```
---
## `./deploy.sh` — Multi-Platform Release
### Subcommands
- `all` (default) — Alle drei Targets (testflight + mdm + android)
- `testflight` — iOS TestFlight via App Store Connect
- `mdm` — iOS Ad-Hoc IPA + scp Upload zu MDM-Server
- `android` — Android APK/AAB via Gradle + Play Console
### Flags
- `--bump` — Bump Build-Number (iOS + Android versionCode)
- `--version X.Y.Z` — Explizite Version setzen
- `--build N` — Explizite iOS Build-Nummer
- `--android-version-code N` — Override Android versionCode
- `--skip-clean` — clean-ios.sh überspringen (iOS)
- `--skip-validate` — altool --validate-app überspringen (TF)
- `--skip-submit` — Play-Console-Submit überspringen (Android)
- `--dry-run` — Alles simulieren, nichts ausführen
### Credentials
**iOS TestFlight:**
- `APPLE_APP_SPECIFIC_PASSWORD` (oder)
- `ASC_API_KEY_PATH` + `ASC_API_KEY_ID` + `ASC_API_KEY_ISSUER`
**iOS MDM:**
- SSH-Access zu `rebreak-mdm` Server (VPN muss laufen)
**Android:**
- ⚠️ **NICHT READY** — siehe Setup unten
---
## `./dev.sh` — Development Tooling
### Subcommands
- `ios` (default) — iOS Dev (Metro + Xcode/Simulator/Device)
- `android` — Android Dev (Metro + Gradle build + install)
- `metro` — Nur Metro starten
- `clean` — iOS Nuclear Clean (Pods, DerivedData, Archives)
- `install ios` — Release-Build auf iPhone USB installieren
- `install android` — Debug-APK auf Android Device installieren
### Flags (ios)
- `--device` — Build auf physisches iPhone via USB
- `--simulator` — Build auf iOS Simulator (default)
- `--xcode` — Nur Xcode öffnen (manueller Build)
- `--wifi` — Metro mit --host lan (für WiFi-Dev auf iPhone)
### Flags (android)
- `--no-build` — Skip Gradle build, nur install last APK
- `--no-launch` — Install but don't auto-launch
### Flags (metro)
- `--keep` — Cache behalten (kein --clear)
### Flags (clean)
- `--build` — + iOS build am Ende
- `--xcode` — + Xcode öffnen am Ende
---
## `./eas-release.sh` — EAS Cloud-Build
**SEPARATER WORKFLOW** — Cloud-Build via Expo Application Services (kein lokaler Build).
```bash
# iOS only (build + TestFlight):
./eas-release.sh
# Android AAB + Play Console Internal:
./eas-release.sh --android
# iOS + Android parallel:
./eas-release.sh --both
# Nur Build, kein Submit:
./eas-release.sh --build-only
```
**Voraussetzungen:**
- `eas login` einmalig durchgeführt
- Android: `serviceAccountKeyPath` in eas.json gesetzt
- iOS: Apple-Connect-Login beim ersten Run
**Hinweis:** Bleibt unangetastet — wird NICHT in `deploy.sh` integriert, da völlig anderer Workflow (Cloud vs. lokal).
---
## ⚠️ Android Deployment Setup — NOCH NICHT READY
### Fehlende Credentials
**1. Release Keystore:**
```bash
# Keystore generieren:
keytool -genkey -v -keystore ~/rebreak-release.keystore \
-alias rebreak -keyalg RSA -keysize 2048 -validity 10000
# Keystore nach android/app/ kopieren (nach prebuild):
npx expo prebuild --platform android --no-install
cp ~/rebreak-release.keystore android/app/
```
**2. Signing Config:**
```bash
# key.properties erstellen (NIEMALS committen):
cat > android/key.properties << EOF
storePassword=<dein-password>
keyPassword=<dein-password>
keyAlias=rebreak
storeFile=rebreak-release.keystore
EOF
# .gitignore prüfen (sollte bereits vorhanden sein):
# android/key.properties
# android/app/*.keystore
```
**3. Play Console Service-Account JSON (für Submit):**
```bash
# 1. Google Cloud Console → Service Accounts → Create → JSON-Key
# 2. Play Console → Setup → API-Access → Service-Account linken
# 3. Permissions: "Releases" (Edit + Read)
# 4. JSON-Key ablegen:
mkdir -p ~/secrets
mv ~/Downloads/rebreak-play-*.json ~/secrets/rebreak-play-service-account.json
# Optional: ENV-Variable setzen (in ~/.zshrc):
export PLAY_SERVICE_ACCOUNT_JSON=~/secrets/rebreak-play-service-account.json
```
**URLs:**
- Google Cloud Console: https://console.cloud.google.com/iam-admin/serviceaccounts
- Play Console API Access: https://play.google.com/console → Setup → API Access
### Status-Check
```bash
# Prüfen ob alles vorhanden:
ls -la android/key.properties
ls -la android/app/*.keystore
ls -la ~/secrets/rebreak-play-service-account.json
# Wenn alle drei Dateien existieren:
./deploy.sh android --bump
```
**Ohne Service-Account-JSON:**
```bash
# Build-only (kein Submit zu Play Store):
./deploy.sh android --bump --skip-submit
# AAB dann manuell uploaden:
# Play Console → Releases → Internal Testing → Create Release
# Upload: android/app/build/outputs/bundle/release/app-release.aab
```
---
## Changelog
**2026-05-30 — Script-Konsolidierung:**
-`deploy.sh` ersetzt `deploy-app.sh`, `deploy-adhoc.sh`, `deploy-tf.sh`
-`dev.sh` ersetzt `dev-build.sh`, `dev-ios.sh`, `dev-iphone.sh`, `install-ios.sh`, `install-android.sh`, `clean-ios.sh`, `metro.sh`
-`eas-release.sh` bleibt separat (Cloud-Build-Workflow)
- ✓ Coloured brew-style output (✓/✗, Sections)
-`--help` für alle Scripts
- ⚠️ Android-Deploy: Credentials fehlen (siehe Setup oben)
**Legacy Scripts gelöscht:**
- `deploy-app.sh`, `deploy-adhoc.sh`, `deploy-tf.sh`
- `dev-build.sh`, `dev-ios.sh`, `dev-iphone.sh`
- `install-ios.sh`, `install-android.sh`
- `clean-ios.sh`, `metro.sh`
- `DEPLOY_APP_USAGE.md` (Info in `--help` integriert)