Skip to content

Latest commit

 

History

History

mobile

This package contains the mobile client for Field. The app is developed in React Native and the Expo CLI.

This is an Expo project created with create-expo-app.

Get started

  1. Install dependencies

    npm install
  2. Install pouchdb-async-storage-adapter The old pouchdb asyncstorage adapter here is no longer maintained nor it updated with the latest version of pouchdb. instead we are using an updated fork which at the time of writing this document is not yet clear what would be the final name/url for this package and thus needs to be installed locally for now using yalc.

    1. in a separate folder clone the fork git clone [email protected]:neighbourhoodie/pouchdb-asyncstorage-adapter.git
    2. cd pouchdb-asyncstorage-adapter
    3. npx yalc publish
    4. go back to mobile app folder and run npx yalc add @neighbourhoodie/pouchdb-asyncstorage-adapter this will link the adapter so it can be bundled with the app. if you get this error while building the app after an npm install
            38 | type Registry<TEventToArgsMap: {...}> = {
            > 39 |   [K in keyof TEventToArgsMap]: Set<Registration<TEventToArgsMap[K]>>,
            |      ^
         40 | };
         41 |
         42 | /**]
      ``` you need to run `npx yalc add @neighbourhoodie/pouchdb-asyncstorage-adapter` again after npm install.
      
      
  3. Start the app

     npx expo start
  4. Run iOS

    npm run ios

In the output, you'll find options to open the app in a

You can start developing by editing the files inside the mobile directory.

This project uses file-based routing.

Development notes

Linting

Run eslint with

npm run lint