From a4397e1978c287908e720e8dbb867a92958a9fd3 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Wed, 7 Jul 2021 16:13:15 +0200 Subject: [PATCH] docs: Update expo install docs --- docs/docs/guides/SETUP.mdx | 42 ++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/docs/docs/guides/SETUP.mdx b/docs/docs/guides/SETUP.mdx index 4413380..98f6b7a 100644 --- a/docs/docs/guides/SETUP.mdx +++ b/docs/docs/guides/SETUP.mdx @@ -17,11 +17,31 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; Install [**react-native-vision-camera**](https://www.npmjs.com/package/react-native-vision-camera) through npm: + + + ```bash npm i react-native-vision-camera npx pod-install ``` + + + + +```bash +expo install react-native-vision-camera +``` + + + + VisionCamera requires **iOS 11 or higher**, and **Android-SDK version 21 or higher**. See [Troubleshooting](/docs/guides/troubleshooting) if you're having installation issues. > **(Optional)** If you want to use [**Frame Processors**](/docs/guides/frame-processors), you need to install [**react-native-reanimated**](https://github.com/software-mansion/react-native-reanimated) 2.2.0 or higher. @@ -31,12 +51,13 @@ VisionCamera requires **iOS 11 or higher**, and **Android-SDK version 21 or high To use a Camera or Microphone you must first specify that your app requires camera and microphone permissions. - + ### iOS @@ -44,10 +65,11 @@ Open your project's `Info.plist` and add the following lines inside the outermos ```xml NSCameraUsageDescription -$(PRODUCT_NAME) needs access to your Camera to record videos and capture photos. +$(PRODUCT_NAME) needs access to your Camera. + NSMicrophoneUsageDescription -$(PRODUCT_NAME) needs access to your Microphone to record videos with audio. +$(PRODUCT_NAME) needs access to your Microphone. ``` ### Android @@ -56,6 +78,7 @@ Open your project's `AndroidManifest.xml` and add the following lines inside the ```xml + ``` @@ -67,24 +90,25 @@ Open your project's `AndroidManifest.xml` and add the following lines inside the Add the VisionCamera plugin to your Expo config (`app.json`, `app.config.json` or `app.config.js`): -```json +```json {5-12} { "name": "my app", "plugins": [ [ "react-native-vision-camera", { - "cameraPermissionText": "$(PRODUCT_NAME) needs access to your Camera to record videos and capture photos.", + "cameraPermissionText": "$(PRODUCT_NAME) needs access to your Camera.", + // optionally, if you want to record audio: "enableMicrophonePermission": true, - "microphonePermissionText": "$(PRODUCT_NAME) needs access to your Microphone to record videos with audio." + "microphonePermissionText": "$(PRODUCT_NAME) needs access to your Microphone." } ] ] } ``` -Finally, run the following command to compile the mods: +Finally, compile the mods: ```bash expo prebuild