# Native platforms (Android · iOS · Flutter) — NOT done until the platform build passes

Before declaring done:
- **Toolchain first:** bump the sample to the family `-core`'s build floors (Android Gradle/AGP/compileSdk/Kotlin; iOS resolve SPM/pods; Flutter swap the dep in `pubspec.yaml` → `flutter pub get`).
- **The wrapper file may refuse every write.** `gradle/wrapper/gradle-wrapper.properties` is a protected path: `Edit`, `Write` and a Bash `sed` against it can each be refused. Attempt it anyway, and if every route is refused, say **exactly which commands were refused** in the report rather than reporting the bump as done — a stale wrapper is the #1 Android build failure (AGP >= 8.9.1 needs Gradle >= 8.11.1). Beyond `&`/`$(…)`/`timeout`, a `|` (even as a sed delimiter or inside an alternation like `(bin|all)`), a `{a,b}` brace expansion and a `VAR=x cmd` env prefix are refused the same way, silently — use `/` delimiters, character classes, plain literals and separate lines before concluding an edit is impossible.
- **Kit dep added AND `initFromSettings` wired** in the app entry (`Application.onCreate` · `AppDelegate`/`App` · Flutter `main`). Flutter's `cometchat-settings.json` is an **asset**: project root AND under `flutter: assets:` in `pubspec.yaml`, or the build fails ("No file or variants found for asset").
- **`toCometChatId` in the CLIENT language** (verbatim Dart port in `references/concept-map.md` §IDs; Kotlin/Swift likewise), own module (`lib/cometchat/ids.dart` · `…/cometchat/Ids.kt` · `CometChat/Ids.swift`), **called at login**. **The UID is `toCometChatId(<the app's existing Stream user id>)`** — the `User(id: …)`/`connectUser`/token-provider id it already has. The core's "fresh app → `cometchat-uid-1`" advice does NOT apply to a migration: the identity exists, keep it.
- **`LICENSE`/README attribution** is residue too.
- **RUN the platform build** (`./gradlew :app:assembleDebug` · `xcodebuild … build` · `flutter analyze && flutter build web`), fix EVERY error, then **run it**: Flutter → `flutter run -d web-server --web-port 8765` via the Bash tool's **background mode** (`run_in_background`), then `sleep 20` and **Read** its output file (repeat ×3) until "is available at" or an exception shows, then **stop that task** and continue. No shell loops, `&`, `$(…)` or `timeout` (denied headless; no `timeout` on macOS); never park on a notification (headless: that ends the run).
