expo-camera 17.0.9-canary-20251015-a6a1272 → 17.1.0-canary-20251023-4c86f95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/android/build.gradle +11 -6
  3. package/android/src/main/java/expo/modules/camera/CameraViewModule.kt +13 -0
  4. package/expo-module.config.json +1 -1
  5. package/ios/CameraViewModule.swift +6 -0
  6. package/ios/Current/BarcodeScanner.swift +4 -1
  7. package/ios/Current/BarcodeScannerUnavailable.swift +40 -0
  8. package/ios/Current/BarcodeScannerUtils.swift +4 -0
  9. package/ios/Current/BarcodeScanningResponseHandler.swift +3 -0
  10. package/ios/Current/MetaDataDelegate.swift +3 -4
  11. package/ios/ExpoCamera.podspec +14 -4
  12. package/local-maven-repo/host/exp/exponent/expo.modules.camera/{17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272-sources.jar → 17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95-sources.jar} +0 -0
  13. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95-sources.jar.md5 +1 -0
  14. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95-sources.jar.sha1 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95-sources.jar.sha256 +1 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95-sources.jar.sha512 +1 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.aar +0 -0
  18. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.aar.md5 +1 -0
  19. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.aar.sha1 +1 -0
  20. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.aar.sha256 +1 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.aar.sha512 +1 -0
  22. package/local-maven-repo/host/exp/exponent/expo.modules.camera/{17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.module → 17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.module} +35 -35
  23. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.module.md5 +1 -0
  24. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.module.sha1 +1 -0
  25. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.module.sha256 +1 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.module.sha512 +1 -0
  27. package/local-maven-repo/host/exp/exponent/expo.modules.camera/{17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.pom → 17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.pom} +14 -14
  28. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.pom.md5 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.pom.sha1 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.pom.sha256 +1 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.1.0-canary-20251023-4c86f95/expo.modules.camera-17.1.0-canary-20251023-4c86f95.pom.sha512 +1 -0
  32. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml +4 -4
  33. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.md5 +1 -1
  34. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha1 +1 -1
  35. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha256 +1 -1
  36. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha512 +1 -1
  37. package/package.json +3 -3
  38. package/plugin/build/withCamera.d.ts +1 -0
  39. package/plugin/build/withCamera.js +15 -1
  40. package/plugin/src/withCamera.ts +32 -1
  41. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272-sources.jar.md5 +0 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272-sources.jar.sha1 +0 -1
  43. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272-sources.jar.sha256 +0 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272-sources.jar.sha512 +0 -1
  45. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.aar +0 -0
  46. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.aar.md5 +0 -1
  47. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.aar.sha1 +0 -1
  48. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.aar.sha256 +0 -1
  49. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.aar.sha512 +0 -1
  50. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.module.md5 +0 -1
  51. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.module.sha1 +0 -1
  52. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.module.sha256 +0 -1
  53. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.module.sha512 +0 -1
  54. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.pom.md5 +0 -1
  55. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.pom.sha1 +0 -1
  56. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.pom.sha256 +0 -1
  57. package/local-maven-repo/host/exp/exponent/expo.modules.camera/17.0.9-canary-20251015-a6a1272/expo.modules.camera-17.0.9-canary-20251015-a6a1272.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  ### 🎉 New features
8
8
 
9
+ - Allow disabling the barcode scanner functionality via config plugin. ([#40444](https://github.com/expo/expo/pull/40444) by [@alanjhughes](https://github.com/alanjhughes))
10
+
9
11
  ### 🐛 Bug fixes
10
12
 
11
13
  ### 💡 Others
@@ -4,18 +4,21 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '17.0.9-canary-20251015-a6a1272'
7
+ version = '17.1.0-canary-20251023-4c86f95'
8
+
9
+ def barcodeScannerEnabled = findProperty('expo.camera.barcode-scanner-enabled')
10
+ def isBarcodeScannerEnabled = (barcodeScannerEnabled ?: "true").toString() != "false"
8
11
 
9
12
  android {
10
13
  namespace "expo.modules.camera"
11
14
  defaultConfig {
12
15
  versionCode 32
13
- versionName "17.0.9-canary-20251015-a6a1272"
16
+ versionName "17.1.0-canary-20251023-4c86f95"
14
17
  }
15
18
  }
16
19
 
17
20
  dependencies {
18
- def camerax_version = "1.5.0-rc01"
21
+ def camerax_version = "1.5.1"
19
22
 
20
23
  api "androidx.exifinterface:exifinterface:1.4.1"
21
24
  api "androidx.appcompat:appcompat:1.7.1"
@@ -24,10 +27,12 @@ dependencies {
24
27
  implementation "androidx.camera:camera-camera2:${camerax_version}"
25
28
  implementation "androidx.camera:camera-lifecycle:${camerax_version}"
26
29
  implementation "androidx.camera:camera-video:${camerax_version}"
27
- implementation "com.google.android.gms:play-services-code-scanner:16.1.0"
28
30
 
29
31
  implementation "androidx.camera:camera-view:${camerax_version}"
30
32
  implementation "androidx.camera:camera-extensions:${camerax_version}"
31
- implementation "com.google.mlkit:barcode-scanning:17.3.0"
32
- implementation "androidx.camera:camera-mlkit-vision:${camerax_version}"
33
+
34
+ def barcodeDependencyConfiguration = isBarcodeScannerEnabled ? "implementation" : "compileOnly"
35
+ add(barcodeDependencyConfiguration, "com.google.android.gms:play-services-code-scanner:16.1.0")
36
+ add(barcodeDependencyConfiguration, "com.google.mlkit:barcode-scanning:17.3.0")
37
+ add(barcodeDependencyConfiguration, "androidx.camera:camera-mlkit-vision:${camerax_version}")
33
38
  }
@@ -148,6 +148,11 @@ class CameraViewModule : Module() {
148
148
  }
149
149
 
150
150
  AsyncFunction("launchScanner") { settings: BarcodeSettings, promise: Promise ->
151
+ if (!CameraUtils.isMLKitBarcodeScannerAvailable()) {
152
+ promise.reject(CameraExceptions.MLKitUnavailableException())
153
+ return@AsyncFunction
154
+ }
155
+
151
156
  if (!CameraUtils.hasGooglePlayServices(appContext.reactContext)) {
152
157
  promise.reject(CameraExceptions.GooglePlayServicesUnavailableException())
153
158
  return@AsyncFunction
@@ -328,12 +333,20 @@ class CameraViewModule : Module() {
328
333
  }
329
334
 
330
335
  Prop("barcodeScannerSettings") { view, settings: BarcodeSettings? ->
336
+ if (!CameraUtils.isMLKitBarcodeScannerAvailable()) {
337
+ appContext.jsLogger?.warn("Barcode scanning has been disabled")
338
+ return@Prop
339
+ }
331
340
  settings?.let {
332
341
  view.setBarcodeScannerSettings(it)
333
342
  }
334
343
  }
335
344
 
336
345
  Prop("barcodeScannerEnabled") { view, enabled: Boolean? ->
346
+ if (!CameraUtils.isMLKitBarcodeScannerAvailable()) {
347
+ view.setShouldScanBarcodes(false)
348
+ return@Prop
349
+ }
337
350
  enabled?.let {
338
351
  view.setShouldScanBarcodes(enabled)
339
352
  }
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "host.exp.exponent",
10
10
  "artifactId": "expo.modules.camera",
11
- "version": "17.0.9-canary-20251015-a6a1272",
11
+ "version": "17.1.0-canary-20251023-4c86f95",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -148,6 +148,7 @@ public final class CameraViewModule: Module, ScannerResultHandler {
148
148
  }
149
149
 
150
150
  Prop("barcodeScannerEnabled") { (view, scanBarcodes: Bool?) in
151
+ #if canImport(ZXingObjC)
151
152
  if let scanBarcodes, view.isScanningBarcodes != scanBarcodes {
152
153
  view.isScanningBarcodes = scanBarcodes
153
154
  return
@@ -155,12 +156,17 @@ public final class CameraViewModule: Module, ScannerResultHandler {
155
156
  if scanBarcodes == nil && view.isScanningBarcodes != false {
156
157
  view.isScanningBarcodes = false
157
158
  }
159
+ #endif
158
160
  }
159
161
 
160
162
  Prop("barcodeScannerSettings") { (view, settings: BarcodeSettings?) in
163
+ #if canImport(ZXingObjC)
161
164
  if let settings {
162
165
  view.setBarcodeScannerSettings(settings: settings)
163
166
  }
167
+ #else
168
+ self.appContext?.jsLogger.warn("Barcode scanning has been disabled")
169
+ #endif
164
170
  }
165
171
 
166
172
  Prop("mute") { (view, muted: Bool?) in
@@ -1,8 +1,10 @@
1
- import ZXingObjC
2
1
  import AVFoundation
3
2
 
4
3
  let BARCODE_TYPES_KEY = "barcodeTypes"
5
4
 
5
+ #if canImport(ZXingObjC)
6
+ import ZXingObjC
7
+
6
8
  class BarcodeScanner: NSObject, BarcodeScanningResponseHandler {
7
9
  private var onBarcodeScanned: (([String: Any]?) -> Void)?
8
10
  var isScanningBarcodes = false
@@ -159,3 +161,4 @@ class BarcodeScanner: NSObject, BarcodeScanningResponseHandler {
159
161
  self.onBarcodeScanned?(result)
160
162
  }
161
163
  }
164
+ #endif
@@ -0,0 +1,40 @@
1
+ #if !canImport(ZXingObjC)
2
+ import AVFoundation
3
+
4
+ class BarcodeScanner: NSObject, BarcodeScanningResponseHandler {
5
+ private var onBarcodeScanned: (([String: Any]?) -> Void)?
6
+ var isScanningBarcodes = false
7
+
8
+ init(session: AVCaptureSession, sessionQueue: DispatchQueue) {}
9
+
10
+ func setSettings(_ newSettings: [String: [AVMetadataObject.ObjectType]]) {}
11
+
12
+ func setPreviewLayer(layer: AVCaptureVideoPreviewLayer) {}
13
+
14
+ func setIsEnabled(_ enabled: Bool) {
15
+ isScanningBarcodes = enabled
16
+ if enabled {
17
+ onBarcodeScanned?(nil)
18
+ }
19
+ }
20
+
21
+ func setConnection(enabled: Bool) {}
22
+
23
+ func setOnBarcodeScanned(_ onBarcodeScanned: @escaping ([String: Any]?) -> Void) {
24
+ self.onBarcodeScanned = onBarcodeScanned
25
+ }
26
+
27
+ func maybeStartBarcodeScanning() {}
28
+
29
+ func stopBarcodeScanning() {
30
+ if isScanningBarcodes {
31
+ isScanningBarcodes = false
32
+ onBarcodeScanned?(nil)
33
+ }
34
+ }
35
+
36
+ func onScanningResult(_ result: [String: Any]) {
37
+ onBarcodeScanned?(result)
38
+ }
39
+ }
40
+ #endif
@@ -1,5 +1,7 @@
1
1
  import AVFoundation
2
+ #if canImport(ZXingObjC)
2
3
  import ZXingObjC
4
+ #endif
3
5
  import VisionKit
4
6
  import Vision
5
7
 
@@ -103,6 +105,7 @@ class BarcodeScannerUtils {
103
105
  ]
104
106
  }
105
107
 
108
+ #if canImport(ZXingObjC)
106
109
  static func zxResultToDictionary(_ barcodeScannerResult: ZXResult) -> [String: Any] {
107
110
  var result = [String: Any]()
108
111
  result["type"] = BarcodeScannerUtils.zxingFormatToString(barcodeScannerResult.barcodeFormat)
@@ -134,4 +137,5 @@ class BarcodeScannerUtils {
134
137
  return "unknown"
135
138
  }
136
139
  }
140
+ #endif
137
141
  }
@@ -0,0 +1,3 @@
1
+ protocol BarcodeScanningResponseHandler {
2
+ func onScanningResult(_ result: [String: Any])
3
+ }
@@ -1,9 +1,7 @@
1
+ #if canImport(ZXingObjC)
2
+ import AVFoundation
1
3
  import ZXingObjC
2
4
 
3
- protocol BarcodeScanningResponseHandler {
4
- func onScanningResult(_ result: [String: Any])
5
- }
6
-
7
5
  class MetaDataDelegate: NSObject, AVCaptureMetadataOutputObjectsDelegate, AVCaptureVideoDataOutputSampleBufferDelegate {
8
6
  private var settings: [String: [AVMetadataObject.ObjectType]]
9
7
  private var previewLayer: AVCaptureVideoPreviewLayer?
@@ -106,3 +104,4 @@ class MetaDataDelegate: NSObject, AVCaptureMetadataOutputObjectsDelegate, AVCapt
106
104
  }
107
105
  }
108
106
  }
107
+ #endif
@@ -1,6 +1,9 @@
1
1
  require 'json'
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json')))
4
+ podfile_properties = JSON.parse(File.read("#{Pod::Config.instance.installation_root}/Podfile.properties.json")) rescue {}
5
+
6
+ barcode_scanner_enabled = podfile_properties.fetch('expo-camera.barcode-scanner-enabled', 'true') != 'false'
4
7
 
5
8
  Pod::Spec.new do |s|
6
9
  s.name = 'ExpoCamera'
@@ -17,16 +20,23 @@ Pod::Spec.new do |s|
17
20
  s.static_framework = true
18
21
 
19
22
  s.dependency 'ExpoModulesCore'
20
- s.dependency 'ZXingObjC/PDF417'
21
- s.dependency 'ZXingObjC/OneD'
23
+ if barcode_scanner_enabled
24
+ s.dependency 'ZXingObjC/PDF417'
25
+ s.dependency 'ZXingObjC/OneD'
26
+ end
22
27
 
23
28
  # Swift/Objective-C compatibility
24
- s.pod_target_xcconfig = {
25
- 'GCC_PREPROCESSOR_DEFINITIONS' => 'ZXINGOBJC_USE_SUBSPECS ZXINGOBJC_PDF417 ZXINGOBJC_ONED',
29
+ xcconfig = {
26
30
  'DEFINES_MODULE' => 'YES',
27
31
  'SWIFT_COMPILATION_MODE' => 'wholemodule'
28
32
  }
29
33
 
34
+ if barcode_scanner_enabled
35
+ xcconfig['GCC_PREPROCESSOR_DEFINITIONS'] = 'ZXINGOBJC_USE_SUBSPECS ZXINGOBJC_PDF417 ZXINGOBJC_ONED'
36
+ end
37
+
38
+ s.pod_target_xcconfig = xcconfig
39
+
30
40
  if !$ExpoUseSources&.include?(package['name']) && ENV['EXPO_USE_SOURCE'].to_i == 0 && File.exist?("#{s.name}.xcframework") && Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
31
41
  s.source_files = "**/*.h"
32
42
  s.vendored_frameworks = "#{s.name}.xcframework"
@@ -0,0 +1 @@
1
+ 3c3f2b6a8e52218cebdd5a3d08cead0e4097700090fada59935bf4e0ccee1a22521c9b3aad57b1ec09b48ffa1eebf1574c8bab880ed7c037fa54e502c8fada95
@@ -0,0 +1 @@
1
+ b166f9002d9e45c5a13bf495f04bb37286215cbdb51660014de8712a6879105a5bd79d3459089c2f0d3e9ddfb8586de9ffb7b1e9765f1fda13225e6cb8178489
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.camera",
6
- "version": "17.0.9-canary-20251015-a6a1272",
6
+ "version": "17.1.0-canary-20251023-4c86f95",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -40,13 +40,13 @@
40
40
  ],
41
41
  "files": [
42
42
  {
43
- "name": "expo.modules.camera-17.0.9-canary-20251015-a6a1272.aar",
44
- "url": "expo.modules.camera-17.0.9-canary-20251015-a6a1272.aar",
45
- "size": 242812,
46
- "sha512": "ec2b75707a4d25229121be07316db35296083b1c6235373e8935aa3558f632d26dbbde81a531288f0c9994aff5d52992131b1304b589b3c45acafd941b962eaf",
47
- "sha256": "8f985e9efedc8bea38850fb08ada2c06d6680a82cf6d5aef4eb776dd97519947",
48
- "sha1": "d4a4fbe6b5953c6a8b586c53e1d027053eb5c4cc",
49
- "md5": "cc8dc2e7e4f6a0c5a23c32c9b7e5e3ad"
43
+ "name": "expo.modules.camera-17.1.0-canary-20251023-4c86f95.aar",
44
+ "url": "expo.modules.camera-17.1.0-canary-20251023-4c86f95.aar",
45
+ "size": 243189,
46
+ "sha512": "b166f9002d9e45c5a13bf495f04bb37286215cbdb51660014de8712a6879105a5bd79d3459089c2f0d3e9ddfb8586de9ffb7b1e9765f1fda13225e6cb8178489",
47
+ "sha256": "661a7076f3bf6d3f58864dd640a6233a822e2c56e0f3d7a709cd1a5fe8610a18",
48
+ "sha1": "049d31b911a029b58cfaafd464640bfcab7dcc3a",
49
+ "md5": "601b54623fd047338cd8b9fa832d4325"
50
50
  }
51
51
  ]
52
52
  },
@@ -70,49 +70,49 @@
70
70
  "group": "androidx.camera",
71
71
  "module": "camera-core",
72
72
  "version": {
73
- "requires": "1.5.0-rc01"
73
+ "requires": "1.5.1"
74
74
  }
75
75
  },
76
76
  {
77
77
  "group": "androidx.camera",
78
78
  "module": "camera-camera2",
79
79
  "version": {
80
- "requires": "1.5.0-rc01"
80
+ "requires": "1.5.1"
81
81
  }
82
82
  },
83
83
  {
84
84
  "group": "androidx.camera",
85
85
  "module": "camera-lifecycle",
86
86
  "version": {
87
- "requires": "1.5.0-rc01"
87
+ "requires": "1.5.1"
88
88
  }
89
89
  },
90
90
  {
91
91
  "group": "androidx.camera",
92
92
  "module": "camera-video",
93
93
  "version": {
94
- "requires": "1.5.0-rc01"
94
+ "requires": "1.5.1"
95
95
  }
96
96
  },
97
97
  {
98
- "group": "com.google.android.gms",
99
- "module": "play-services-code-scanner",
98
+ "group": "androidx.camera",
99
+ "module": "camera-view",
100
100
  "version": {
101
- "requires": "16.1.0"
101
+ "requires": "1.5.1"
102
102
  }
103
103
  },
104
104
  {
105
105
  "group": "androidx.camera",
106
- "module": "camera-view",
106
+ "module": "camera-extensions",
107
107
  "version": {
108
- "requires": "1.5.0-rc01"
108
+ "requires": "1.5.1"
109
109
  }
110
110
  },
111
111
  {
112
- "group": "androidx.camera",
113
- "module": "camera-extensions",
112
+ "group": "com.google.android.gms",
113
+ "module": "play-services-code-scanner",
114
114
  "version": {
115
- "requires": "1.5.0-rc01"
115
+ "requires": "16.1.0"
116
116
  }
117
117
  },
118
118
  {
@@ -126,7 +126,7 @@
126
126
  "group": "androidx.camera",
127
127
  "module": "camera-mlkit-vision",
128
128
  "version": {
129
- "requires": "1.5.0-rc01"
129
+ "requires": "1.5.1"
130
130
  }
131
131
  },
132
132
  {
@@ -146,13 +146,13 @@
146
146
  ],
147
147
  "files": [
148
148
  {
149
- "name": "expo.modules.camera-17.0.9-canary-20251015-a6a1272.aar",
150
- "url": "expo.modules.camera-17.0.9-canary-20251015-a6a1272.aar",
151
- "size": 242812,
152
- "sha512": "ec2b75707a4d25229121be07316db35296083b1c6235373e8935aa3558f632d26dbbde81a531288f0c9994aff5d52992131b1304b589b3c45acafd941b962eaf",
153
- "sha256": "8f985e9efedc8bea38850fb08ada2c06d6680a82cf6d5aef4eb776dd97519947",
154
- "sha1": "d4a4fbe6b5953c6a8b586c53e1d027053eb5c4cc",
155
- "md5": "cc8dc2e7e4f6a0c5a23c32c9b7e5e3ad"
149
+ "name": "expo.modules.camera-17.1.0-canary-20251023-4c86f95.aar",
150
+ "url": "expo.modules.camera-17.1.0-canary-20251023-4c86f95.aar",
151
+ "size": 243189,
152
+ "sha512": "b166f9002d9e45c5a13bf495f04bb37286215cbdb51660014de8712a6879105a5bd79d3459089c2f0d3e9ddfb8586de9ffb7b1e9765f1fda13225e6cb8178489",
153
+ "sha256": "661a7076f3bf6d3f58864dd640a6233a822e2c56e0f3d7a709cd1a5fe8610a18",
154
+ "sha1": "049d31b911a029b58cfaafd464640bfcab7dcc3a",
155
+ "md5": "601b54623fd047338cd8b9fa832d4325"
156
156
  }
157
157
  ]
158
158
  },
@@ -166,13 +166,13 @@
166
166
  },
167
167
  "files": [
168
168
  {
169
- "name": "expo.modules.camera-17.0.9-canary-20251015-a6a1272-sources.jar",
170
- "url": "expo.modules.camera-17.0.9-canary-20251015-a6a1272-sources.jar",
171
- "size": 28564,
172
- "sha512": "6e2803acda486e42d85ae895ab6e8c03d1e720bf41d844c1b7ffed7ffa8c7995bae84fd3e4cbaa2dbdd1af5eab74c597d380fdcdab22d137616313b40cd8ba40",
173
- "sha256": "600c3d5108bc9c4dce6691b919f44e54574452ea54814147f48eb0f733a35576",
174
- "sha1": "e7ebc932f895e4d15912d44624e1c331f46f9e63",
175
- "md5": "9cfdd973aa0c606c6a0e98838fb08991"
169
+ "name": "expo.modules.camera-17.1.0-canary-20251023-4c86f95-sources.jar",
170
+ "url": "expo.modules.camera-17.1.0-canary-20251023-4c86f95-sources.jar",
171
+ "size": 28629,
172
+ "sha512": "3c3f2b6a8e52218cebdd5a3d08cead0e4097700090fada59935bf4e0ccee1a22521c9b3aad57b1ec09b48ffa1eebf1574c8bab880ed7c037fa54e502c8fada95",
173
+ "sha256": "0aaf0701cfc65a240fc590a6ef358ce32938526607384429250c2ffdde25658d",
174
+ "sha1": "50ada51928a2ef12a1b1f1af8d2021dfc941c01b",
175
+ "md5": "e6b4a0300343de5e4c41708aa17030b5"
176
176
  }
177
177
  ]
178
178
  }
@@ -0,0 +1 @@
1
+ d8b5dab129a097108c096f813b64ae3191f2f89c09108e2d348e6b4c755ddd81e8dea58edbfbf079af191688beab2e95d964a0d297a2928b741a3650d9defe20
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.camera</artifactId>
12
- <version>17.0.9-canary-20251015-a6a1272</version>
12
+ <version>17.1.0-canary-20251023-4c86f95</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.camera</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -46,43 +46,43 @@
46
46
  <dependency>
47
47
  <groupId>androidx.camera</groupId>
48
48
  <artifactId>camera-core</artifactId>
49
- <version>1.5.0-rc01</version>
49
+ <version>1.5.1</version>
50
50
  <scope>runtime</scope>
51
51
  </dependency>
52
52
  <dependency>
53
53
  <groupId>androidx.camera</groupId>
54
54
  <artifactId>camera-camera2</artifactId>
55
- <version>1.5.0-rc01</version>
55
+ <version>1.5.1</version>
56
56
  <scope>runtime</scope>
57
57
  </dependency>
58
58
  <dependency>
59
59
  <groupId>androidx.camera</groupId>
60
60
  <artifactId>camera-lifecycle</artifactId>
61
- <version>1.5.0-rc01</version>
61
+ <version>1.5.1</version>
62
62
  <scope>runtime</scope>
63
63
  </dependency>
64
64
  <dependency>
65
65
  <groupId>androidx.camera</groupId>
66
66
  <artifactId>camera-video</artifactId>
67
- <version>1.5.0-rc01</version>
68
- <scope>runtime</scope>
69
- </dependency>
70
- <dependency>
71
- <groupId>com.google.android.gms</groupId>
72
- <artifactId>play-services-code-scanner</artifactId>
73
- <version>16.1.0</version>
67
+ <version>1.5.1</version>
74
68
  <scope>runtime</scope>
75
69
  </dependency>
76
70
  <dependency>
77
71
  <groupId>androidx.camera</groupId>
78
72
  <artifactId>camera-view</artifactId>
79
- <version>1.5.0-rc01</version>
73
+ <version>1.5.1</version>
80
74
  <scope>runtime</scope>
81
75
  </dependency>
82
76
  <dependency>
83
77
  <groupId>androidx.camera</groupId>
84
78
  <artifactId>camera-extensions</artifactId>
85
- <version>1.5.0-rc01</version>
79
+ <version>1.5.1</version>
80
+ <scope>runtime</scope>
81
+ </dependency>
82
+ <dependency>
83
+ <groupId>com.google.android.gms</groupId>
84
+ <artifactId>play-services-code-scanner</artifactId>
85
+ <version>16.1.0</version>
86
86
  <scope>runtime</scope>
87
87
  </dependency>
88
88
  <dependency>
@@ -94,7 +94,7 @@
94
94
  <dependency>
95
95
  <groupId>androidx.camera</groupId>
96
96
  <artifactId>camera-mlkit-vision</artifactId>
97
- <version>1.5.0-rc01</version>
97
+ <version>1.5.1</version>
98
98
  <scope>runtime</scope>
99
99
  </dependency>
100
100
  </dependencies>
@@ -0,0 +1 @@
1
+ ef4f39df7a1f02434794734de7e05fdd6c3fe37bcf6c50693f9783a3e546eaa6eb2a5d6a5869fa23eb6653610bca974fb771ea7a8e34ab2c097ba17a2398b0aa
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.camera</artifactId>
5
5
  <versioning>
6
- <latest>17.0.9-canary-20251015-a6a1272</latest>
7
- <release>17.0.9-canary-20251015-a6a1272</release>
6
+ <latest>17.1.0-canary-20251023-4c86f95</latest>
7
+ <release>17.1.0-canary-20251023-4c86f95</release>
8
8
  <versions>
9
- <version>17.0.9-canary-20251015-a6a1272</version>
9
+ <version>17.1.0-canary-20251023-4c86f95</version>
10
10
  </versions>
11
- <lastUpdated>20251015164451</lastUpdated>
11
+ <lastUpdated>20251023075128</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- e62d57e3f3a47eab25a4d36ea173fd53
1
+ 80fdd190438705bd4044af20f8c8342c
@@ -1 +1 @@
1
- c1396bb97cf9f99b8228da8c84ed9c860cb85249
1
+ 184b94671b88aadc91995ced54ba06080cc875e4
@@ -1 +1 @@
1
- 72b48c06f7ffed49597ffefebe95c9dfd9c44a538222d8aa87324b9ebafd9d89
1
+ e1a71f1907b9c9deaab261be67d77a1cc3b09bff06262353392a82d2334c79c6
@@ -1 +1 @@
1
- ab3777cc097431fee13ddbe65f4e93c08903dd99d67101b15760b9fcdda804a56e47cfa1ded73f702f98a7b69f2419aaad4dd487afe6af3576a597f11ec39cfc
1
+ 5d355cb5bed589ea3cf9c6690bdfd0968dfa4140bae3fb7628b66a484314a265e60395e48f0c2fff16d5d1a811bd26d9f979f9ff25d8c9c12a78c2ed7502652a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-camera",
3
- "version": "17.0.9-canary-20251015-a6a1272",
3
+ "version": "17.1.0-canary-20251023-4c86f95",
4
4
  "description": "A React component that renders a preview for the device's either front or back camera. Camera's parameters like zoom, auto focus, white balance and flash mode are adjustable. With expo-camera, one can also take photos and record videos that are saved to the app's cache. Morever, the component is also capable of detecting faces and bar codes appearing on the preview.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -37,10 +37,10 @@
37
37
  "invariant": "^2.2.4"
38
38
  },
39
39
  "devDependencies": {
40
- "expo-module-scripts": "5.0.8-canary-20251015-a6a1272"
40
+ "expo-module-scripts": "5.0.8-canary-20251023-4c86f95"
41
41
  },
42
42
  "peerDependencies": {
43
- "expo": "55.0.0-canary-20251015-a6a1272",
43
+ "expo": "55.0.0-canary-20251023-4c86f95",
44
44
  "react": "*",
45
45
  "react-native": "*",
46
46
  "react-native-web": "*"
@@ -3,5 +3,6 @@ declare const _default: ConfigPlugin<void | {
3
3
  cameraPermission?: string | false;
4
4
  microphonePermission?: string | false;
5
5
  recordAudioAndroid?: boolean;
6
+ barcodeScannerEnabled?: boolean;
6
7
  }>;
7
8
  export default _default;
@@ -4,7 +4,8 @@ const config_plugins_1 = require("expo/config-plugins");
4
4
  const pkg = require('expo-camera/package.json');
5
5
  const CAMERA_USAGE = 'Allow $(PRODUCT_NAME) to access your camera';
6
6
  const MICROPHONE_USAGE = 'Allow $(PRODUCT_NAME) to access your microphone';
7
- const withCamera = (config, { cameraPermission, microphonePermission, recordAudioAndroid = true } = {}) => {
7
+ const BARCODE_SCANNER_KEY = 'expo.camera.barcode-scanner-enabled';
8
+ const withCamera = (config, { cameraPermission, microphonePermission, recordAudioAndroid = true, barcodeScannerEnabled = true, } = {}) => {
8
9
  config_plugins_1.IOSConfig.Permissions.createPermissionsPlugin({
9
10
  NSCameraUsageDescription: CAMERA_USAGE,
10
11
  NSMicrophoneUsageDescription: MICROPHONE_USAGE,
@@ -12,6 +13,19 @@ const withCamera = (config, { cameraPermission, microphonePermission, recordAudi
12
13
  NSCameraUsageDescription: cameraPermission,
13
14
  NSMicrophoneUsageDescription: microphonePermission,
14
15
  });
16
+ config = (0, config_plugins_1.withPodfileProperties)(config, (config) => {
17
+ if (barcodeScannerEnabled === false) {
18
+ config.modResults[BARCODE_SCANNER_KEY] = 'false';
19
+ }
20
+ else {
21
+ delete config.modResults[BARCODE_SCANNER_KEY];
22
+ }
23
+ return config;
24
+ });
25
+ config = (0, config_plugins_1.withGradleProperties)(config, (config) => {
26
+ config.modResults = config_plugins_1.AndroidConfig.BuildProperties.updateAndroidBuildProperty(config.modResults, BARCODE_SCANNER_KEY, barcodeScannerEnabled === false ? 'false' : null, { removePropWhenValueIsNull: true });
27
+ return config;
28
+ });
15
29
  config = config_plugins_1.AndroidConfig.Permissions.withPermissions(config, [
16
30
  'android.permission.CAMERA',
17
31
  // Optional
@@ -3,20 +3,32 @@ import {
3
3
  type ConfigPlugin,
4
4
  createRunOncePlugin,
5
5
  IOSConfig,
6
+ withGradleProperties,
7
+ withPodfileProperties,
6
8
  } from 'expo/config-plugins';
7
9
 
8
10
  const pkg = require('expo-camera/package.json');
9
11
 
10
12
  const CAMERA_USAGE = 'Allow $(PRODUCT_NAME) to access your camera';
11
13
  const MICROPHONE_USAGE = 'Allow $(PRODUCT_NAME) to access your microphone';
14
+ const BARCODE_SCANNER_KEY = 'expo.camera.barcode-scanner-enabled';
12
15
 
13
16
  const withCamera: ConfigPlugin<
14
17
  {
15
18
  cameraPermission?: string | false;
16
19
  microphonePermission?: string | false;
17
20
  recordAudioAndroid?: boolean;
21
+ barcodeScannerEnabled?: boolean;
18
22
  } | void
19
- > = (config, { cameraPermission, microphonePermission, recordAudioAndroid = true } = {}) => {
23
+ > = (
24
+ config,
25
+ {
26
+ cameraPermission,
27
+ microphonePermission,
28
+ recordAudioAndroid = true,
29
+ barcodeScannerEnabled = true,
30
+ } = {}
31
+ ) => {
20
32
  IOSConfig.Permissions.createPermissionsPlugin({
21
33
  NSCameraUsageDescription: CAMERA_USAGE,
22
34
  NSMicrophoneUsageDescription: MICROPHONE_USAGE,
@@ -25,6 +37,25 @@ const withCamera: ConfigPlugin<
25
37
  NSMicrophoneUsageDescription: microphonePermission,
26
38
  });
27
39
 
40
+ config = withPodfileProperties(config, (config) => {
41
+ if (barcodeScannerEnabled === false) {
42
+ config.modResults[BARCODE_SCANNER_KEY] = 'false';
43
+ } else {
44
+ delete config.modResults[BARCODE_SCANNER_KEY];
45
+ }
46
+ return config;
47
+ });
48
+
49
+ config = withGradleProperties(config, (config) => {
50
+ config.modResults = AndroidConfig.BuildProperties.updateAndroidBuildProperty(
51
+ config.modResults,
52
+ BARCODE_SCANNER_KEY,
53
+ barcodeScannerEnabled === false ? 'false' : null,
54
+ { removePropWhenValueIsNull: true }
55
+ );
56
+ return config;
57
+ });
58
+
28
59
  config = AndroidConfig.Permissions.withPermissions(
29
60
  config,
30
61
  [
@@ -1 +0,0 @@
1
- 6e2803acda486e42d85ae895ab6e8c03d1e720bf41d844c1b7ffed7ffa8c7995bae84fd3e4cbaa2dbdd1af5eab74c597d380fdcdab22d137616313b40cd8ba40
@@ -1 +0,0 @@
1
- ec2b75707a4d25229121be07316db35296083b1c6235373e8935aa3558f632d26dbbde81a531288f0c9994aff5d52992131b1304b589b3c45acafd941b962eaf
@@ -1 +0,0 @@
1
- 70a7273c1eacbc5d185f33514f5cf58191686cba79ca7a1a1d6e3c6238f1a5a86fd7b4aebcc40f1aebbe7b6fe679bf19d96049c870e02a1c11878a2a66adf9df
@@ -1 +0,0 @@
1
- 4be0a28202dc002fcea53152f21fb08e96aa4eb59fdfc8dcc14d5d9c75d69660c72d9603befad7d59207d1a7cd90679cf3441a7bb62958a336c6d883a85285ea