Skip to content

Update Quickstart for React Native to v5#267

Open
Aaron LaBeau (biozal) wants to merge 14 commits intomainfrom
da-138-update-v5-react-native
Open

Update Quickstart for React Native to v5#267
Aaron LaBeau (biozal) wants to merge 14 commits intomainfrom
da-138-update-v5-react-native

Conversation

@biozal
Copy link
Copy Markdown
Contributor

@biozal Aaron LaBeau (biozal) commented Apr 20, 2026

Summary

  • Migrate React Native quickstart from Ditto SDK v4 to v5 API (Ditto.open, DittoConfig, auth, sync, store)
  • Upgrade Expo SDK 54 → 55 (React 19.2.0, React Native 0.83.4, Gradle 9.0)
  • Add init() call before Ditto.open() per v5 best practice
  • Add expo-build-properties dependency with Kotlin 2.1.20 (required by v5 Ditto Expo plugin)
  • Add missing DITTO_AUTH_URL / DITTO_WEBSOCKET_URL env type declarations
  • Fix all npm audit vulnerabilities to 0 (fast-xml-parser → 5.7.1, @tootallnate/once → 3.0.1, plus lodash, @xmldom/xmldom, brace-expansion, yaml)
  • Remove deprecated edgeToEdgeEnabled from app.json (mandatory in Android 16 / SDK 55)
  • Add Xcode 26.2 requirement to README
  • Add Expo-specific v5 migration guide (MIGRATION-EXPO-V5.md)

Build Verification

Platform Status Toolchain
iOS ✅ Built Xcode 26.2
Android ✅ Built Gradle 9.0, Kotlin 2.1.20, OpenJDK 17
TypeScript ✅ Clean tsc --noEmit
ESLint ✅ Clean expo lint
npm audit ✅ 0 vulnerabilities

Test plan

  • TypeScript check clean
  • ESLint clean
  • npm audit: 0 vulnerabilities
  • iOS build succeeds (Xcode 26.2)
  • Android build succeeds (Gradle 9.0, OpenJDK 17)
  • Manual: verify sync works on iOS device/simulator
  • Manual: verify sync works on Android device/emulator
  • Manual: verify P2P Bluetooth/WiFi sync between devices

🤖 Generated with Claude Code

- 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>
Aaron LaBeau (biozal) and others added 2 commits April 20, 2026 19:00
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>
@biozal Aaron LaBeau (biozal) changed the title Draft: Update Quickstart for React Native to v5 - DO NOT MERGE Update Quickstart for React Native to v5 May 5, 2026
Aaron LaBeau (biozal) and others added 3 commits May 5, 2026 14:47
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
@biozal Aaron LaBeau (biozal) marked this pull request as ready for review May 5, 2026 19:54
Copilot AI review requested due to automatic review settings May 5, 2026 19:54
Aaron LaBeau (biozal) and others added 2 commits May 5, 2026 14:59
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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread react-native/App.tsx
Comment thread react-native/package.json
Comment thread react-native/README.md Outdated
Comment thread react-native-expo/MIGRATION-EXPO-V5.md Outdated
Comment thread react-native-expo/package.json Outdated
Comment thread react-native/package.json
Aaron LaBeau (biozal) and others added 6 commits May 5, 2026 16:36
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants