1.0.4 • Published 4 years ago

@vouched.id/react-native-vouched v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Getting started with example project

Example project is located in example directory. Is is build from a blank RN project with steps outlined in using.md (you do not need to repeat them to get started with example project).

To launch example, after checking out sources, you need to:

1. Download models and link them to the XCode project

Download model files inference_graph.tflite and labelmap_mobilenet_card.txt and place them in example/ios/Models directory and in example/android/app/src/main/assets. Make sure files are added to XCode example project, including Models directory.

2. APP ID

Get your Vouched App ID, and set it in example/env.json

{
  "APP_ID": "<PUBLIC KEY - APP_ID>"
}

2 (cnt). Firebase

Add Google Services.plist and google-services.json

  • Add GoogleService-Info.plist to example/ios/example
  • Add google-services.json to example/android/app

3. Install example dependencies

cd example
yarn install
cd ios
pod install

4. Build and install IOS app

  1. cd example; yarn start
  2. Open example/ios/example.xcworkspace in Xcode
  3. Set the signing capabilities in Targets / example / Signing & Capabilities
  4. Connector your phone, select it in XCode, and run the app.

5. Build and install Android app

  1. cd example; yarn start
  2. cd example; yarn android

Development workflow

After each change in library, to get updates in example, you need to

  1. yarn install
  2. yarn build
  3. Stop example bundler
  4. cd example; rm -fr ./node_modules/react-native-vouched
  5. yarn add react-native-vouched@file:../
  6. Start example bundler.
  7. Restart app.