Prerequisites
Ditto’s React Native Quickstart supports iOS and Android . Before getting started, ensure you have the following:
A code editor (Visual Studio Code is our recommendation, but any code editor will work)
Git installed on your machine
Node.js installed on your machine
A Ditto Portal account with a configured Ditto Application (see Getting SDK Connection Details )
Android Specific Prerequisites
Android Studio installed on your machine
A physical Android device or Android emulator
iOS Specific Prerequisites
A macOS machine with the latest version of Xcode (15 or later) installed
A physical iOS device or iOS simulator
Get Started
1. Clone the Repository
Open the terminal
Clone the repository from GitHub.
git clone https://github.com/getditto/quickstart
Navigate to the project root directory:
Get Ditto App ID, Playground Token, Auth URL, and Websocket URL
Add Ditto Credentials
Copy the .env.sample
file at the root of the quickstart
repo to .env
and add your app ID and online playground token.
Update the .env
file with the App ID and Playground Token from your Ditto Application
DITTO_APP_ID = "REPLACE_ME_WITH_YOUR_APP_ID"
DITTO_PLAYGROUND_TOKEN = "REPLACE_ME_WITH_YOUR_PLAYGROUND_TOKEN"
DITTO_AUTH_URL = "REPLACE_ME_WITH_YOUR_AUTH_URL"
DITTO_WEBSOCKET_URL = "REPLACE_ME_WITH_YOUR_WEBSOCKET_URL"
3. Run the Application
Open a terminal and navigate to your application folder.
Install dependencies
Run the Application
( cd ios && RCT_NEW_ARCH_ENABLED = 1 pod install )
yarn react-native run-ios
4. Sync-Data Offline
Launch the application on multiple devices or simulators Disconnect from your current WiFi network while keeping WiFi enabled on the device to allow for LAN connections Add, edit, and delete tasks and experience offline collaboration!
Next Steps
All the Ditto Quickstart apps works together! Try running a quickstart app in other languages and see them all collaborate.
Additional Resources
Responses are generated using AI and may contain mistakes.