Demo React Native App for react-native-sync
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Initial commit Mar 19, 2018
docs Updated Readme and added screenshots Mar 21, 2018
.babelrc Initial commit Mar 19, 2018
.buckconfig Initial commit Mar 19, 2018
.eslintrc.json Initial commit Mar 19, 2018
.flowconfig Initial commit Mar 19, 2018
.gitattributes Initial commit Mar 19, 2018
.gitignore Initial commit Mar 19, 2018
.watchmanconfig Initial commit Mar 19, 2018
DatabaseScreen.js Updated demo server url Mar 21, 2018
FilesScreen.js Initial commit Mar 19, 2018
README.md Update README.md Mar 21, 2018
RecordScreen.js Initial commit Mar 19, 2018
SettingsScreen.js Initial commit Mar 19, 2018
app.json Initial commit Mar 19, 2018
index.js Initial commit Mar 19, 2018
package.json Initial commit Mar 19, 2018
rn-cli.config.js Initial commit Mar 19, 2018
sync.js Updated demo server url Mar 21, 2018

README.md

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 -create ios and android 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.

settings.png pull_sync.png
database.png record_editor.png
files.png doc_viewer.png

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.