diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 310003ee8ad..b23db64896d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1415,7 +1415,7 @@ PODS: - SDWebImage/Core (~> 5.17) - SocketRocket (0.6.1) - Turf (2.7.0) - - VisionCamera (2.16.8): + - VisionCamera (4.0.0-beta.11): - React - React-callinvoker - React-Core @@ -1920,7 +1920,7 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: af09429398d99d524cae2fe00f6f0f6e491ed102 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 Turf: 13d1a92d969ca0311bbc26e8356cca178ce95da2 - VisionCamera: 0a6794d1974aed5d653d0d0cb900493e2583e35a + VisionCamera: b6b6f46949eae83b71429c971162af337ef34fa3 Yoga: e64aa65de36c0832d04e8c7bd614396c77a80047 PODFILE CHECKSUM: a431c146e1501391834a2f299a74093bac53b530 diff --git a/package-lock.json b/package-lock.json index dc170b7a957..f3707da97e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -114,7 +114,7 @@ "react-native-tab-view": "^3.5.2", "react-native-url-polyfill": "^2.0.0", "react-native-view-shot": "3.8.0", - "react-native-vision-camera": "2.16.8", + "react-native-vision-camera": "^4.0.0-beta.11", "react-native-web": "^0.19.9", "react-native-web-linear-gradient": "^1.1.2", "react-native-web-sound": "^0.1.3", @@ -39642,11 +39642,18 @@ } }, "node_modules/react-native-vision-camera": { - "version": "2.16.8", - "license": "MIT", + "version": "4.0.0-beta.11", + "resolved": "https://registry.npmjs.org/react-native-vision-camera/-/react-native-vision-camera-4.0.0-beta.11.tgz", + "integrity": "sha512-cKg/nwT0q0H1ivEVG+PQt/QxhFgf/dd7SiMm7bCzlSCmt0T2tXyIdLsuY312iKBB2qasQZOYtzRsoQjipHQkDw==", "peerDependencies": { "react": "*", - "react-native": "*" + "react-native": "*", + "react-native-worklets-core": "*" + }, + "peerDependenciesMeta": { + "react-native-worklets-core": { + "optional": true + } } }, "node_modules/react-native-web": { diff --git a/package.json b/package.json index 26918ddc1ce..e0b85aa8f98 100644 --- a/package.json +++ b/package.json @@ -165,7 +165,7 @@ "react-native-tab-view": "^3.5.2", "react-native-url-polyfill": "^2.0.0", "react-native-view-shot": "3.8.0", - "react-native-vision-camera": "2.16.8", + "react-native-vision-camera": "^4.0.0-beta.11", "react-native-web": "^0.19.9", "react-native-web-linear-gradient": "^1.1.2", "react-native-web-sound": "^0.1.3", diff --git a/patches/react-native-vision-camera+2.16.8.patch b/patches/react-native-vision-camera+2.16.8.patch deleted file mode 100644 index 3afc4573985..00000000000 --- a/patches/react-native-vision-camera+2.16.8.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/node_modules/react-native-vision-camera/android/build.gradle b/node_modules/react-native-vision-camera/android/build.gradle -index ddfa243..bafffc3 100644 ---- a/node_modules/react-native-vision-camera/android/build.gradle -+++ b/node_modules/react-native-vision-camera/android/build.gradle -@@ -334,7 +334,7 @@ if (ENABLE_FRAME_PROCESSORS) { - def thirdPartyVersions = new Properties() - thirdPartyVersions.load(new FileInputStream(thirdPartyVersionsFile)) - -- def BOOST_VERSION = thirdPartyVersions["BOOST_VERSION"] -+ def BOOST_VERSION = thirdPartyVersions["BOOST_VERSION"] ?: "1.83.0" - def boost_file = new File(downloadsDir, "boost_${BOOST_VERSION}.tar.gz") - def DOUBLE_CONVERSION_VERSION = thirdPartyVersions["DOUBLE_CONVERSION_VERSION"] - def double_conversion_file = new File(downloadsDir, "double-conversion-${DOUBLE_CONVERSION_VERSION}.tar.gz") -@@ -352,7 +352,7 @@ if (ENABLE_FRAME_PROCESSORS) { - - task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) { - def transformedVersion = BOOST_VERSION.replace("_", ".") -- def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz" -+ def srcUrl = "https://archives.boost.io/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz" - if (REACT_NATIVE_VERSION < 69) { - srcUrl = "https://github.com/react-native-community/boost-for-react-native/releases/download/v${transformedVersion}-0/boost_${BOOST_VERSION}.tar.gz" - } diff --git a/src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/index.native.js b/src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/index.native.js index 65c17d3cb7a..64fa291b200 100644 --- a/src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/index.native.js +++ b/src/pages/iou/request/step/IOURequestStepScan/NavigationAwareCamera/index.native.js @@ -15,6 +15,7 @@ const NavigationAwareCamera = React.forwardRef(({cameraTabIndex, ...props}, ref) return ( { // Store the receipt on the transaction object in Onyx @@ -266,7 +267,7 @@ function IOURequestStepScan({ showCameraAlert(); Log.warn('Error taking photo', error); }); - }, [flash, action, translate, transactionID, updateScanAndNavigate, navigateToConfirmationStep, cameraPermissionStatus]); + }, [flash, hasFlash, action, translate, transactionID, updateScanAndNavigate, navigateToConfirmationStep, cameraPermissionStatus]); // Wait for camera permission status to render if (cameraPermissionStatus == null) { @@ -365,20 +366,22 @@ function IOURequestStepScan({ height={CONST.RECEIPT.SHUTTER_SIZE} /> - setFlash((prevFlash) => !prevFlash)} - > - - + {hasFlash && ( + setFlash((prevFlash) => !prevFlash)} + > + + + )} );