expo-camera 55.0.10 → 55.0.11

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 (40) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +2 -2
  3. package/expo-module.config.json +1 -1
  4. package/ios/CameraViewModule.swift +18 -13
  5. package/ios/Current/CameraSessionManager.swift +15 -11
  6. package/ios/Current/CameraView.swift +0 -4
  7. package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10.module → 55.0.11/expo.modules.camera-55.0.11.module} +7 -7
  8. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.11/expo.modules.camera-55.0.11.module.md5 +1 -0
  9. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.11/expo.modules.camera-55.0.11.module.sha1 +1 -0
  10. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.11/expo.modules.camera-55.0.11.module.sha256 +1 -0
  11. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.11/expo.modules.camera-55.0.11.module.sha512 +1 -0
  12. package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10.pom → 55.0.11/expo.modules.camera-55.0.11.pom} +1 -1
  13. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.11/expo.modules.camera-55.0.11.pom.md5 +1 -0
  14. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.11/expo.modules.camera-55.0.11.pom.sha1 +1 -0
  15. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.11/expo.modules.camera-55.0.11.pom.sha256 +1 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.11/expo.modules.camera-55.0.11.pom.sha512 +1 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml +4 -4
  18. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.md5 +1 -1
  19. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha1 +1 -1
  20. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha256 +1 -1
  21. package/local-maven-repo/host/exp/exponent/expo.modules.camera/maven-metadata.xml.sha512 +1 -1
  22. package/package.json +2 -2
  23. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.10/expo.modules.camera-55.0.10.module.md5 +0 -1
  24. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.10/expo.modules.camera-55.0.10.module.sha1 +0 -1
  25. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.10/expo.modules.camera-55.0.10.module.sha256 +0 -1
  26. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.10/expo.modules.camera-55.0.10.module.sha512 +0 -1
  27. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.10/expo.modules.camera-55.0.10.pom.md5 +0 -1
  28. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.10/expo.modules.camera-55.0.10.pom.sha1 +0 -1
  29. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.10/expo.modules.camera-55.0.10.pom.sha256 +0 -1
  30. package/local-maven-repo/host/exp/exponent/expo.modules.camera/55.0.10/expo.modules.camera-55.0.10.pom.sha512 +0 -1
  31. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10-sources.jar → 55.0.11/expo.modules.camera-55.0.11-sources.jar} +0 -0
  32. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10-sources.jar.md5 → 55.0.11/expo.modules.camera-55.0.11-sources.jar.md5} +0 -0
  33. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10-sources.jar.sha1 → 55.0.11/expo.modules.camera-55.0.11-sources.jar.sha1} +0 -0
  34. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10-sources.jar.sha256 → 55.0.11/expo.modules.camera-55.0.11-sources.jar.sha256} +0 -0
  35. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10-sources.jar.sha512 → 55.0.11/expo.modules.camera-55.0.11-sources.jar.sha512} +0 -0
  36. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10.aar → 55.0.11/expo.modules.camera-55.0.11.aar} +0 -0
  37. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10.aar.md5 → 55.0.11/expo.modules.camera-55.0.11.aar.md5} +0 -0
  38. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10.aar.sha1 → 55.0.11/expo.modules.camera-55.0.11.aar.sha1} +0 -0
  39. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10.aar.sha256 → 55.0.11/expo.modules.camera-55.0.11.aar.sha256} +0 -0
  40. /package/local-maven-repo/host/exp/exponent/expo.modules.camera/{55.0.10/expo.modules.camera-55.0.10.aar.sha512 → 55.0.11/expo.modules.camera-55.0.11.aar.sha512} +0 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 55.0.11 — 2026-03-24
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [iOS] Use runtime camera availability checks in Simulator so camera code paths can run when a runtime video device is present while preserving fallback behavior when no device is available. (by [@kmagiera](https://github.com/kmagiera)) ([#44159](https://github.com/expo/expo/pull/44159) by [@kmagiera](https://github.com/kmagiera))
18
+
13
19
  ## 55.0.10 — 2026-03-17
14
20
 
15
21
  ### 🐛 Bug fixes
@@ -4,7 +4,7 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '55.0.10'
7
+ version = '55.0.11'
8
8
 
9
9
  def barcodeScannerEnabled = findProperty('expo.camera.barcode-scanner-enabled')
10
10
  def isBarcodeScannerEnabled = (barcodeScannerEnabled ?: "true").toString() != "false"
@@ -13,7 +13,7 @@ android {
13
13
  namespace "expo.modules.camera"
14
14
  defaultConfig {
15
15
  versionCode 32
16
- versionName "55.0.10"
16
+ versionName "55.0.11"
17
17
  }
18
18
  }
19
19
 
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "host.exp.exponent",
10
10
  "artifactId": "expo.modules.camera",
11
- "version": "55.0.10",
11
+ "version": "55.0.11",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -267,16 +267,20 @@ public final class CameraViewModule: Module, ScannerResultHandler {
267
267
 
268
268
  AsyncFunction("takePictureRef") { (view, options: TakePictureOptions) -> PictureRef in
269
269
  #if targetEnvironment(simulator)
270
- return try takePictureRefForSimulator(self.appContext, view, options)
271
- #else
272
- return try await view.takePictureRef(options: options)
270
+ if AVCaptureDevice.default(for: .video) == nil {
271
+ return try takePictureRefForSimulator(self.appContext, view, options)
272
+ }
273
273
  #endif
274
+ return try await view.takePictureRef(options: options)
274
275
  }
275
276
 
276
277
  AsyncFunction("takePicture") { (view, options: TakePictureOptions, promise: Promise) in
277
- #if targetEnvironment(simulator) // simulator
278
- try takePictureForSimulator(self.appContext, view, options, promise)
279
- #else
278
+ #if targetEnvironment(simulator)
279
+ if AVCaptureDevice.default(for: .video) == nil {
280
+ try takePictureForSimulator(self.appContext, view, options, promise)
281
+ return
282
+ }
283
+ #endif
280
284
  Task {
281
285
  do {
282
286
  let result = try await view.takePicturePromise(options: options)
@@ -285,17 +289,17 @@ public final class CameraViewModule: Module, ScannerResultHandler {
285
289
  promise.reject(error)
286
290
  }
287
291
  }
288
- #endif
289
292
  }
290
293
 
291
294
  AsyncFunction("record") { (view, options: CameraRecordingOptions, promise: Promise) in
292
295
  #if targetEnvironment(simulator)
293
- throw Exceptions.SimulatorNotSupported()
294
- #else
296
+ if AVCaptureDevice.default(for: .video) == nil {
297
+ throw Exceptions.SimulatorNotSupported()
298
+ }
299
+ #endif
295
300
  Task {
296
301
  await view.record(options: options, promise: promise)
297
302
  }
298
- #endif
299
303
  }
300
304
 
301
305
  AsyncFunction("toggleRecording") { view in
@@ -308,10 +312,11 @@ public final class CameraViewModule: Module, ScannerResultHandler {
308
312
 
309
313
  AsyncFunction("stopRecording") { view in
310
314
  #if targetEnvironment(simulator)
311
- throw Exceptions.SimulatorNotSupported()
312
- #else
313
- view.stopRecording()
315
+ if AVCaptureDevice.default(for: .video) == nil {
316
+ throw Exceptions.SimulatorNotSupported()
317
+ }
314
318
  #endif
319
+ view.stopRecording()
315
320
  }
316
321
  }
317
322
 
@@ -52,7 +52,9 @@ class CameraSessionManager: NSObject, DeviceDiscoveryDelegate {
52
52
  }
53
53
 
54
54
  func updateSessionPreset(preset: AVCaptureSession.Preset, withSessionConfiguration: Bool = true) {
55
- #if !targetEnvironment(simulator)
55
+ guard hasAvailableCameraDevice else {
56
+ return
57
+ }
56
58
  if session.canSetSessionPreset(preset) {
57
59
  if session.sessionPreset != preset {
58
60
  if withSessionConfiguration {
@@ -64,7 +66,6 @@ class CameraSessionManager: NSObject, DeviceDiscoveryDelegate {
64
66
  }
65
67
  }
66
68
  } else {
67
- // The selected preset cannot be used on the current device so we fall back to the highest available.
68
69
  if session.sessionPreset != .high {
69
70
  if withSessionConfiguration {
70
71
  session.beginConfiguration()
@@ -75,7 +76,6 @@ class CameraSessionManager: NSObject, DeviceDiscoveryDelegate {
75
76
  }
76
77
  }
77
78
  }
78
- #endif
79
79
  }
80
80
 
81
81
  func updateDevice() {
@@ -272,9 +272,10 @@ class CameraSessionManager: NSObject, DeviceDiscoveryDelegate {
272
272
  }
273
273
 
274
274
  func stopSession() {
275
- #if targetEnvironment(simulator)
276
- return
277
- #else
275
+ guard hasAvailableCameraDevice else {
276
+ return
277
+ }
278
+
278
279
  runtimeErrorTask?.cancel()
279
280
  runtimeErrorTask = nil
280
281
  session.beginConfiguration()
@@ -290,7 +291,6 @@ class CameraSessionManager: NSObject, DeviceDiscoveryDelegate {
290
291
  if session.isRunning {
291
292
  session.stopRunning()
292
293
  }
293
- #endif
294
294
  }
295
295
 
296
296
  func addErrorNotification() {
@@ -362,10 +362,15 @@ class CameraSessionManager: NSObject, DeviceDiscoveryDelegate {
362
362
  }
363
363
  }
364
364
 
365
+ private var hasAvailableCameraDevice: Bool {
366
+ return AVCaptureDevice.default(for: .video) != nil
367
+ }
368
+
365
369
  private func startSession() {
366
- #if targetEnvironment(simulator)
367
- return
368
- #else
370
+ guard hasAvailableCameraDevice else {
371
+ return
372
+ }
373
+
369
374
  guard let delegate else {
370
375
  return
371
376
  }
@@ -400,6 +405,5 @@ class CameraSessionManager: NSObject, DeviceDiscoveryDelegate {
400
405
  delegate?.onCameraReady()
401
406
  }
402
407
  enableTorch()
403
- #endif
404
408
  }
405
409
  }
@@ -160,9 +160,7 @@ public class CameraView: ExpoView, EXAppLifecycleListener, EXCameraInterface, Ca
160
160
  videoRecording = CameraVideoRecording(delegate: self)
161
161
  session = sessionManager.session
162
162
 
163
- #if !targetEnvironment(simulator)
164
163
  setupPreview()
165
- #endif
166
164
  barcodeScanner = createBarcodeScanner()
167
165
  UIDevice.current.beginGeneratingDeviceOrientationNotifications()
168
166
  NotificationCenter.default.addObserver(
@@ -208,14 +206,12 @@ public class CameraView: ExpoView, EXAppLifecycleListener, EXCameraInterface, Ca
208
206
  }
209
207
 
210
208
  private func updatePictureSize() {
211
- #if !targetEnvironment(simulator)
212
209
  sessionQueue.async {
213
210
  if self.mode == .picture {
214
211
  let preset = self.pictureSize.toCapturePreset()
215
212
  self.sessionManager.updateSessionPreset(preset: preset)
216
213
  }
217
214
  }
218
- #endif
219
215
  }
220
216
 
221
217
  func setBarcodeScannerSettings(settings: BarcodeSettings) {
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.camera",
6
- "version": "55.0.10",
6
+ "version": "55.0.11",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -40,8 +40,8 @@
40
40
  ],
41
41
  "files": [
42
42
  {
43
- "name": "expo.modules.camera-55.0.10.aar",
44
- "url": "expo.modules.camera-55.0.10.aar",
43
+ "name": "expo.modules.camera-55.0.11.aar",
44
+ "url": "expo.modules.camera-55.0.11.aar",
45
45
  "size": 247692,
46
46
  "sha512": "ec176be898748075419c264cfd6587d184ae6223dc64d5bec48ec4baeb959eed532faa061ccd62a7efcac779971d5ae5c93c172b6ec042c64c070b3f718953a8",
47
47
  "sha256": "d192b7cd2385ccd27c32b317970562c10c7288b4455532b2676fd9c05860c151",
@@ -146,8 +146,8 @@
146
146
  ],
147
147
  "files": [
148
148
  {
149
- "name": "expo.modules.camera-55.0.10.aar",
150
- "url": "expo.modules.camera-55.0.10.aar",
149
+ "name": "expo.modules.camera-55.0.11.aar",
150
+ "url": "expo.modules.camera-55.0.11.aar",
151
151
  "size": 247692,
152
152
  "sha512": "ec176be898748075419c264cfd6587d184ae6223dc64d5bec48ec4baeb959eed532faa061ccd62a7efcac779971d5ae5c93c172b6ec042c64c070b3f718953a8",
153
153
  "sha256": "d192b7cd2385ccd27c32b317970562c10c7288b4455532b2676fd9c05860c151",
@@ -166,8 +166,8 @@
166
166
  },
167
167
  "files": [
168
168
  {
169
- "name": "expo.modules.camera-55.0.10-sources.jar",
170
- "url": "expo.modules.camera-55.0.10-sources.jar",
169
+ "name": "expo.modules.camera-55.0.11-sources.jar",
170
+ "url": "expo.modules.camera-55.0.11-sources.jar",
171
171
  "size": 29083,
172
172
  "sha512": "026c8ca43c56694a89b33c7a57a7b0ad7b8c4a8552911f5198cf167a1835f1006a32501d17502cc4ffa545b83b2ff73a442090d5de819dbf7ccfa7279ce8f36b",
173
173
  "sha256": "fb6fc10073864be50cdcf3f26efa6904cadbb709bb471a3db65d819110a649c7",
@@ -0,0 +1 @@
1
+ 27f770c83f01fe83d239b03bb2a8ccbc18c7ba48790081c116e105ab06fd7d95
@@ -0,0 +1 @@
1
+ 1c367dee7beb1878f7ff2835aff8045b9350d1bf66c36853f5a1aa00107a34320f91e567af226f89dcd7f5d61577eba1cfd71d42cb3635d6f114cff33ffae786
@@ -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>55.0.10</version>
12
+ <version>55.0.11</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.camera</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 0f0514c70face4a5df6de2a82adcf9b19972c6ebd35c8edd9598191321fea46d
@@ -0,0 +1 @@
1
+ 375ada252d09a3a059c54c51f8787050533e2025abdfc7e548780adc33afff99b6931c403a41807743fcd8a69ddad42d2d4bf3d5078f3227b964b8ebccfc9b2e
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.camera</artifactId>
5
5
  <versioning>
6
- <latest>55.0.10</latest>
7
- <release>55.0.10</release>
6
+ <latest>55.0.11</latest>
7
+ <release>55.0.11</release>
8
8
  <versions>
9
- <version>55.0.10</version>
9
+ <version>55.0.11</version>
10
10
  </versions>
11
- <lastUpdated>20260317165315</lastUpdated>
11
+ <lastUpdated>20260324183238</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 44bbf2ae241bf04e6c888d957f1ee876
1
+ 7205d36e315a7cd4b3ebafaced25f7ba
@@ -1 +1 @@
1
- 761c480a42c07e74e49868a8d4d8fde22ba5e30e
1
+ 89ab91b74800e86668af827ee9438ed3598616d7
@@ -1 +1 @@
1
- d64f5eb86eab3369ceb839c738cbc71df59360d922f02080acc847fa9efde49f
1
+ a7e4dd136d28f099195e159fa385c92293a5b435ca6554fb12660bbc8419002c
@@ -1 +1 @@
1
- c5a180a2820e835f05ec447c0ce835506d860cfc77feee379b647e4c5cbdafcd7383cedd43e34a9dadf652eea05f568661c7c793fb38b5078711a9b92ef34ba9
1
+ 7eabfad19f45dbfaed75b2c1cbdfe2368a3160a952dbd0afce76d3ee4e0e414f020d6a8557e45b867c3ce4c7b92705661400666d998f15b62e0646cb4c767b67
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-camera",
3
- "version": "55.0.10",
3
+ "version": "55.0.11",
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",
@@ -50,5 +50,5 @@
50
50
  "optional": true
51
51
  }
52
52
  },
53
- "gitHead": "9260ae10a08271027d85792b7128e0d4883dca4d"
53
+ "gitHead": "bebc2df1790c9395a43fdaee2d1aa00f992d6f4d"
54
54
  }
@@ -1 +0,0 @@
1
- 660e076042407eb4bf8e5e2a53db8644d14a29d5a17c421565841c21cff83d01
@@ -1 +0,0 @@
1
- 18dd7463b801d02d9d79fc42f9151e5c0bb9caf8bcd152cac74d13f6368799d982985c56c59420018264e7bbb79f579cdfe0005ffa8c4ef7cb9b288a0d4d9324
@@ -1 +0,0 @@
1
- 8f96c44f13435a0403dca4a8abca4e575777e38a93590afb06d4f3fd7be15356
@@ -1 +0,0 @@
1
- 0376bc344973172dc435713b210594e3c69ae957132e56baf24a68828ef198da7fbbddee31e1d5e71454ecd7444581c4635c395232a759801f6aac2f3bc7ed8e