react-native-sync-demo
v1.0.0
Published
Demo React Native App for react-native-sync
Downloads
6
Maintainers
Readme
react-native-sync-demo
Demo React Native App for react-native-sync.
Setup the source code
- Download and unpack the demo app zip file
- Work in app folder:
cd react-native-sync-demo-master
- Run
yarn install
to populate node_modules - Run
react-native eject
to -createios
andandroid
folders - Run
react-native link
to link native lib
Run the app
Use Xcode to open the iOS project in the react-native-sync-demo-master/ios
folder. Run the app in simulator.
On the Settings tab, fill in the sync server and sync user info. Feel free to use our test server url:
http://203.195.233.31:8080/pervasync/server
. Use user name user1
or user2
. Password is password
.
After you save the server url and user credentials, navigate to the Database
tab and do a pull-to-refresh to start a sync session. The initial sync may take 100 seconds to pull down around a set of tables with 10 thousand records and a handful of files from sync server. After that, incremental sync would only take a couple of seconds. Use the Database
and Files
tabs to examine the DB table contents and view the synod files.
||| |:-------------:| :-------------:| ||| ||| |||
Your own sync server and React Native app
If you like the sync tool, you can setup your own sync server to publish your database tables and OS folders to be synced to your mobile app. More info at pervasync.com.
You can create your own app based on the demo or write it from scratch. Either way, check out react-native-sync for details of the sync API.