A sample React Native application that lets you create tasks and sync them with the Ditto Cloud via OnlinePlayground authentication. This example is built according to the official Ditto installation guide for React Native.
- React Native Install Guide
- Javascript/React Native API Reference
- Javascript/React Native Release Notes
- Ditto Portal Account: Ensure you have a Ditto account. Sign up here.
- App Credentials: After registration, create an application within the Ditto Portal to obtain your
AppID,Online Playground Token,Auth URL, andWebsocket URL. Visit the Ditto Portal to manage your applications.
# Project is set up to work seamlessly with yarn
yarn installRunning the start script launches the "Metro" dev tool, which will build the iOS, Android, or macOS apps on demand.
After running the start command, press i to launch the iOS simulator, a to launch the Android emulator, or m to launch the macOS app.
yarn startFor iOS:
(cd ios && pod install)
yarn react-native run-iosFor Android:
yarn react-native run-androidFor macOS:
yarn react-native run-macos- Task Creation: Users can add new tasks to their list.
- Real-time Sync: Tasks are synchronized in real-time across all devices using the same Ditto application.
- Cross-Platform: Supports iOS, Android, and macOS platforms.
- Limitation: React Native's Fast Refresh must be disabled and it's something we're working on fixing.
If you encounter an issue with iOS installing pod files, check your terminal to make sure your environment is set up correctly. For example:
❯ pod install
[!] Invalid `Podfile` file: cannot load such file -- /Users/xxxx/Developer/ditto/quickstart/react-native/node_modules/react-native/scripts/react_native_pods.rb
Debugger listening on ws://127.0.0.1:59620/xxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect....
# from /Users/xxxx/Developer/ditto/quickstart/react-native/ios/Podfile:2
# -------------------------------------------
# # Resolve react_native_pods.rb with node to allow for hoisting
> require Pod::Executable.execute_command('node', ['-p',
# 'require.resolve(
# -------------------------------------------This error is usually an issue with the terminal setup. If you are using the terminal in your IDE, we suggest you use the terminal app that comes with iOS to see if this is an issue with your terminal setup.
Should you encounter any issues, please refer to the Ditto documentation or check the FAQs on the Ditto Portal.
For support or queries, reach out to us via support@ditto.live.

