Update Quickstart for React Native to v5#267
Open
Aaron LaBeau (biozal) wants to merge 14 commits intomainfrom
Open
Update Quickstart for React Native to v5#267Aaron LaBeau (biozal) wants to merge 14 commits intomainfrom
Aaron LaBeau (biozal) wants to merge 14 commits intomainfrom
Conversation
- Migrate from Ditto v4 to v5 API (Ditto.open, DittoConfig, auth, sync, store) - Remove DITTO_WEBSOCKET_URL (replaced by server URL in DittoConfig) - Remove DQL_STRICT_MODE (defaults to false in v5) - Update DittoInfo component to show databaseId instead of appId - Add Android 12+ Bluetooth/WiFi Direct permissions for P2P sync - Add npm overrides for transitive dependency audit vulnerabilities - Add Jest test infrastructure (setup, mocks, config) - Bump @dittolive/ditto to 5.0.0-rc.2 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Xcode 26.2 or lower required due to fmt consteval bug in Ditto SDK. Gradle 8.12 or lower required with Kotlin 2.1.0. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lnerabilities - Upgrade Expo SDK 54 → 55 (React 19.2, RN 0.83.4, Gradle 9.0) - Add init() call before Ditto.open() per v5 best practice - Add expo-build-properties with Kotlin 2.1.20 for Android builds - Add missing DITTO_AUTH_URL/DITTO_WEBSOCKET_URL env type declarations - Fix all npm audit vulnerabilities (fast-xml-parser → 5.7.1, @tootallnate/once → 3.0.1) - Remove deprecated edgeToEdgeEnabled from app.json (mandatory in Android 16) - Add Xcode 26.2 requirement to README - Add Expo-specific v5 migration guide (MIGRATION-EXPO-V5.md) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
react-native: bump @react-native-community/cli + platform-android/ios from 20.0.0 to 20.1.3 and update fast-xml-parser override 5.5.7 → 5.7.3 to patch GHSA-gh4j-gqv2-49f6 (XML Comment/CDATA injection in XMLBuilder). react-native-expo: add postcss 8.5.14 to overrides/resolutions to patch GHSA-qx2v-qp2m-jg93 (XSS via unescaped </style> in CSS stringify output). Both apps: npm audit reports 0 vulnerabilities. tsc --noEmit and lint pass for both. The rc.2 → 5.0.0 @dittolive/ditto bump in package.json files is pre-existing branch work. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…t-native # Conflicts: # react-native-expo/ios/Podfile # react-native-expo/ios/Podfile.lock # react-native-expo/ios/Podfile.properties.json # react-native-expo/ios/reactnativeexpo.xcodeproj/project.pbxproj # react-native-expo/ios/reactnativeexpo/AppDelegate.swift # react-native-expo/ios/reactnativeexpo/Info.plist
Podfile.lock was never tracked on main but slipped into this branch. Removing from the index and adding to .gitignore so pod install regenerates it locally without polluting the PR diff. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the React Native quickstarts toward Ditto SDK v5, including app-level API changes, Expo SDK 55/native project regeneration, and supporting docs/test/tooling updates across both the bare React Native and Expo samples.
Changes:
- Updates Ditto dependencies and React Native/Expo project configuration for the v5 migration.
- Refreshes native Android/iOS generated/config files, environment typings, and Jest setup to match the new integration.
- Adds/updates migration and setup documentation for new toolchain and dependency requirements.
Reviewed changes
Copilot reviewed 25 out of 32 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
react-native/types/env.d.ts |
Removes unused websocket env typing from bare RN sample. |
react-native/README.md |
Updates bare RN setup requirements and credentials docs. |
react-native/package.json |
Bumps Ditto and adjusts transitive dependency pinning. |
react-native/jest.setup.js |
Adds Jest mocks for Ditto and safe-area APIs. |
react-native/jest.config.js |
Wires Jest setup and env module mapping. |
react-native/ios/Podfile.lock |
Regenerates CocoaPods lockfile for new iOS deps. |
react-native/ios/Podfile |
Minor Podfile formatting-only change. |
react-native/ios/DittoReactNativeSampleApp.xcodeproj/project.pbxproj |
Tweaks iOS build flags/settings for the upgraded stack. |
react-native/components/DittoInfo.tsx |
Renames displayed identifier label/prop. |
react-native/App.tsx |
Applies Ditto v5 app initialization/auth/query changes in bare RN sample. |
react-native/android/app/src/main/AndroidManifest.xml |
Adds newer Android Bluetooth/Wi‑Fi permissions. |
react-native/__mocks__/@env.js |
Adds Jest env-variable mock values. |
react-native-expo/types/env.d.ts |
Adds missing Expo env typings for auth/websocket URLs. |
react-native-expo/README.md |
Documents Expo-specific toolchain requirements. |
react-native-expo/package.json |
Upgrades Expo/React Native/Ditto dependencies and security pins. |
react-native-expo/MIGRATION-EXPO-V5.md |
Adds Expo-specific Ditto v5 migration guide. |
react-native-expo/App.tsx |
Adds init() and keeps Ditto v5 app logic in Expo sample. |
react-native-expo/app.json |
Updates Expo config/plugins for SDK 55 and Kotlin settings. |
react-native-expo/android/gradlew |
Regenerated Gradle wrapper script. |
react-native-expo/android/gradle/wrapper/gradle-wrapper.properties |
Upgrades Gradle wrapper to 9.0.0. |
react-native-expo/android/gradle.properties |
Refreshes generated Android Gradle properties. |
react-native-expo/android/app/src/main/res/values/styles.xml |
Updates Android theme/system bar styling for SDK 55. |
react-native-expo/android/app/src/main/res/values/strings.xml |
Removes obsolete splash/status-bar string. |
react-native-expo/android/app/src/main/res/values/colors.xml |
Removes obsolete color resource. |
react-native-expo/android/app/src/main/java/com/anonymous/reactnativeexpo/MainApplication.kt |
Regenerates Expo application host bootstrap for newer RN/Expo. |
react-native-expo/android/app/src/main/AndroidManifest.xml |
Refreshes generated Expo Android manifest and permission metadata. |
react-native-expo/android/app/build.gradle |
Updates Hermes/codegen paths for newer React Native build layout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ditto.open,DittoConfig, auth, sync, store)init()call beforeDitto.open()per v5 best practiceexpo-build-propertiesdependency with Kotlin 2.1.20 (required by v5 Ditto Expo plugin)DITTO_AUTH_URL/DITTO_WEBSOCKET_URLenv type declarationsfast-xml-parser→ 5.7.1,@tootallnate/once→ 3.0.1, pluslodash,@xmldom/xmldom,brace-expansion,yaml)edgeToEdgeEnabledfromapp.json(mandatory in Android 16 / SDK 55)MIGRATION-EXPO-V5.md)Build Verification
Test plan
🤖 Generated with Claude Code