Commit Graph

95 Commits

Author SHA1 Message Date
Ivan Vershigora
58ff00300c feat: detectQRCodeInImage API 2026-04-24 19:25:34 +01:00
Overtorment
a8535da0d3 fix: duplicate method 2026-04-19 20:23:10 +01:00
Ivan Vershigora
202f9f6455
Resolve merge conflicts, preserve no-google customizations 2026-01-17 10:21:18 +00:00
Seph Soliman
a73b84ef78 Removed iOsSleepBeforeStarting
No longer needed with proper begin/commit handling
2026-01-08 16:41:43 -08:00
Seph Soliman
a2f61a0cbb Added iOsDeferredStart for UI performance
Reformatted RealCamera.swift
2026-01-08 13:19:54 -08:00
Seph Soliman
cdc1cced0e Fixed #758
NSGenericException "startRunning may not be called between calls to
beginConfiguration and commitConfiguration"
The root cause was that AVCaptureSession.previewLayer.session = X
causes beginConfiguration + commitConfiguration, and since we had that
running on the main thread, it caused a race condition between the main
and sessionQueue threads.
iOsSleepBeforeStarting will be removed in an upcoming major release to
avoid breaking changes in v16.
2026-01-08 12:05:17 -08:00
Ivan Vershigora
05ae12c0b1
Sync from teslamotors/react-native-camera-kit@cc6515b
Selectively synced upstream changes while preserving QR-only Android implementation.

Changes auto-synced (Category A - 19 files):
- iOS: All 8 files (stress test support + allowedBarcodeTypes filtering)
- TypeScript: All 7 files (Camera components, props, types, specs)
- Example app: All 3 files (stress test + allowedBarcodeTypes example)
- Config: Moved .nvmrc to root

Changes selectively synced (Category B - 2 files):
- CodeFormat.kt: Added UPC_A("upc-a") enum value (1 hunk applied, 1 skipped)
- README.md: Added allowedBarcodeTypes docs with QR-only note

Changes skipped (Android barcode conflicts):
- CKCamera.kt: All barcode filtering logic (~50+ hunks)
  Reason: Fork uses onBarcodeRead(String), upstream uses onBarcodeRead(List<Barcode>, Size)
- CKCameraManager.kt: setAllowedBarcodeTypes property setter
- package.json: Version bump (fork maintains independent versioning)

Upstream range: 5a709e0..cc6515b (12 commits)
Main feature: allowedBarcodeTypes barcode filtering (iOS synced, Android QR-only preserved)

Fork integrity checks:
 No Google ML Kit dependencies
 QRDecoder.decode() preserved
 limpbrains/qr dependency intact
 yarn build && yarn lint passed

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 23:27:08 +00:00
Seph Soliman
f5e3bc98e9 Add mount stress test to CameraKit example app
Introduces a mount stress test feature in the example app, allowing repeated mounting and unmounting of the CameraExample component at a configurable interval. Updates CameraExample to support a 'stress' mode that triggers image capture and random zoom changes on mount.
2026-01-05 14:33:04 -08:00
Seph Soliman
2a1f06aa12 Fixed optional behavior of allowedBarcodeTypes
Added more barcode types
2025-12-30 15:11:19 -08:00
Kseniya Vinnichek
1ea413a099 Merge remote-tracking branch 'upstream/master' into refactoring
# Conflicts:
#	android/src/main/java/com/rncamerakit/CKCamera.kt
#	android/src/newarch/java/com/rncamerakit/CKCameraManager.kt
#	android/src/paper/java/com/facebook/react/viewmanagers/CKCameraManagerDelegate.java
#	android/src/paper/java/com/facebook/react/viewmanagers/CKCameraManagerInterface.java
2025-11-20 10:41:02 +01:00
Kseniya Vinnichek
f8be0f08e8 correct allowed barcode types validation, remove invalid reference, and prevent fallback errors 2025-11-19 11:32:43 +01:00
Seph Soliman
9acbc4981a Fixed zoom/maxZoom issue on legacy arch when (max)Zoom isn't defined 2025-10-01 10:52:32 -07:00
Seph Soliman
e3c93b9b88 Fixed torch not being enabled on startup #593 2025-09-09 18:25:01 -07:00
Seph Soliman
dcb94f4dcc
Merge pull request #745 from lukebars/master
fix: remove orientation listener on camera unmount
2025-09-09 14:03:42 -07:00
Seph Soliman
84d11bfc58 Fixed support for RN 0.76 and other older RN versions
Removed includesGeneratedCode since it's unreliable and is temporary
Added new/old arch code split for Android
2025-09-09 13:15:50 -07:00
Lukas Baranauskas
af4cf16618 fix: remove orientation listener on camera unmount 2025-09-09 06:55:15 +00:00
Seph Soliman
9a41d1c8ae Fixed SafeAreaView dummy support on iOS
Fixed zoom issue
Fixed Fabric (new arch) compile issues on both platforms
Fixed included broken codegen lib code
Fixed broken .h import paths to avoid setting custom build settings
Fixed potential memory issue by disabling view recycling
Added Fabric (new arch) support for camera view component
Added RN 0.81 for example
Added RN 0.79 for main lib
Added helper for re-running codegen
Added gitignore for Android codegen making a podspec
Added support for scanThrottleDelay on Android
Added includesGeneratedCode to package.json to indicate changes
Rewrote optional int props to use -1 instead due to RN bug
Moved to Obj-C with C++ support (.mm) to avoid C++ compile issues
2025-09-04 15:38:29 -07:00
Seph Soliman
5e59d8a1fc
Merge pull request #731 from SmartArray/fix/rn-ios-0.80.0
Fix fabric layout issues in iOS on fresh React Native v0.80.0
2025-08-26 17:58:15 -07:00
David Bertet
cee93fdff1 Fix memory leak introduced in 21f7601
Self is accessed within AVCaptureEventInteraction closure, which is stored in eventInteraction class variable, creating a retain cycle
Use [weak self] to break the cycle
21f760117b (diff-5011dc3d3aefd7b67661ffa11130868519526e31f62f630ebf6ddc2d7f714e09R128-R135)
2025-07-17 23:42:22 -07:00
Ilya Pasternak
cc6d18ceaa change forbiddenBarcodeTypes property to allowedBarcodeTypes 2025-07-02 14:52:26 +03:00
Yoshi Jaeger
c70b91e385 fix(ios): give each view constraints according to new fabric behavior 2025-06-26 19:00:53 +02:00
Ilya Pasternak
b085a7801c Merge remote-tracking branch 'origin/master' 2025-06-26 19:57:43 +03:00
William
8d76406553
Fix checking focusMode instead of zoomMode 2025-06-19 15:36:32 -05:00
Ilya Pasternak
6d0bed7ce0 add forbiddenBarcodeTypes property 2025-06-16 09:54:16 +03:00
Seph Soliman
089fd73041 Fixed AVCaptureSession (2nd attempt)
Fixed iOS 13 compile errors
2025-06-09 16:46:02 -07:00
Seph Soliman
ed64f2fc46 Fixed AVCaptureSession startRunning error
commit should always follow a begin
2025-04-23 15:56:09 -07:00
Wojciech Lewicki
438d4c2f53
fix: maxPhotoQualityPrioritization and add barcode prop on new arch 2025-04-01 16:24:14 +02:00
Wojciech Lewicki
589c251888
Merge branch 'master' into @wolewicki/fix-booleans-and-add-missing-prop 2025-04-01 13:08:53 +02:00
Seph Soliman
2cd45d963e
Merge pull request #701 from phlpsong/barcodeFrameSize_prop
feat: make scan box size customizable
2025-03-31 09:56:41 -07:00
phlpsong
674c545446 chore: update README and format code 2025-03-13 18:13:58 +08:00
phlpsong
d17257308e fix: scanner box size changed but rectOfInterest 2025-03-11 19:10:15 +08:00
Wojciech Lewicki
9a526f2a72
Update ios/ReactNativeCameraKit/CKCameraViewComponentView.mm 2025-03-07 10:51:05 +01:00
Marcos Rodriguez Vélez
3193427143
fix camera orientation for Mac Catalyst 2025-02-27 20:04:03 -04:00
Marcos Rodriguez Velez
1e1921223b add mac catalyst support 2025-02-25 23:08:14 -04:00
phlpsong
855b90b5fe feat: add barcodeFrameSize prop 2025-02-24 22:08:16 +08:00
Wojciech Lewicki
971b78e7d2
fix: booleans on ios and missing prop 2025-01-07 15:58:15 +01:00
Seph Soliman
2376770cf6
Merge branch 'master' into @wolewicki/add-new-arch 2024-11-14 13:46:25 -08:00
Seph Soliman
ace123eefa Added maxPhotoQualityPrioritization for iOS
Allows a massive capture speed-up of 60-80%
2024-11-14 13:34:07 -08:00
Wojciech Lewicki
3b0f913704
fix: indent 2024-08-08 12:46:54 +02:00
Wojciech Lewicki
e034bbb8bc
fix: fixes for use_frameworks 2024-08-08 11:09:01 +02:00
Wojciech Lewicki
0e15019377
feat: add support for new arch 2024-08-06 11:35:56 +02:00
Seph Soliman
21f760117b RN 0.71.0 -> 0.74.1
Added support for volume buttons as capture buttons
Added yarn v3.6.4
2024-05-14 17:43:02 -07:00
Martin Lichstam
80c517dc68
Add resize mode cover/contain (#644)
* Add resize mode cover/contain

* Add resize to simulator, change type enum and add listener for resize

* Add resize to camera example

* Add description of resizeMode to readme

* Add description of resizeMode to readme

* Update ios/ReactNativeCameraKit/CameraView.swift

---------

Co-authored-by: Seph Soliman <github@seph.dk>
2024-04-30 16:24:19 -07:00
Imdad Ismail
234e7f89eb
added code format to see type of code scanned (#633)
* added code format to see type of code scanned

* Update ios/ReactNativeCameraKit/SimulatorCamera.swift

Changed supported barcode types to list of CodeFormat

Co-authored-by: David Bertet <11665957+DavidBertet@users.noreply.github.com>

* Update android/src/main/java/com/rncamerakit/CodeFormat.kt

Added annotation for int type

Co-authored-by: David Bertet <11665957+DavidBertet@users.noreply.github.com>

* Added CodeFormat types and fixed an indentation on a function to match other functions

* Replaced AVMetadataObject with CodeFormat in all files

* Updated code format to case Iterable and changed supportedBarcodeType to code format cases

* Update src/Camera.d.ts

---------

Co-authored-by: David Bertet <11665957+DavidBertet@users.noreply.github.com>
Co-authored-by: Seph Soliman <github@seph.dk>
2024-04-30 16:18:00 -07:00
David Bertet
a13aa787c4
Add iOS linter & report issues on PR (#634)
* Add iOS linter & report issues on PR

* Fix lint errors

---------

Co-authored-by: Seph Soliman <github@seph.dk>
2024-04-30 16:10:07 -07:00
David Bertet
00c461a144
Return height/width of capture (#646)
To be consistent with Android
2024-04-30 12:14:00 -07:00
Seph Soliman
11b15fd236 Fixed Swift runtime failure/crash during unexpected capture() call
'Unexpectedly found nil while implicitly unwrapping an Optional value'
2023-11-03 14:38:19 -07:00
Seph Soliman
33b3f98937 Added multi-lens zoom support for iPhone 12, 13, and 14
(they 'only' have ultra-wide and wide)
2023-08-10 14:35:37 -07:00
Seph Soliman
c02b13f2eb iOS: Default zoom to 1.0 when wide angle is the first device 2023-08-05 13:58:06 -07:00
Seph Soliman
925816f830 Fixed iOS NSRangeException when zooming
Error was 'index 18446744073709551615 beyond bounds [0 .. 0]'
for RealCamera.defaultZoomFactor
2023-08-05 12:03:49 -07:00