Breaking changes
- Removed the
CameraScreen
component. Copy-paste theexample/src/CameraExample.tsx
file to get a good replacement starting point.
Why? We kept getting feature requests, and it's not possible for us to design and create a generic, good-looking UI that fits all use cases. The ultimate feature set for theCameraScreen
component was effectively just theCamera
component, thus it made sense to remove it. - Objective-C -> Swift migration. May break things unintentionally
showFrame
is now positioned differently than before on Android (centered)setTorchMode
was removed as it was un-React like. Please use the declarativetorchMode="on"
instead- Pinch to zoom behavior changed slightly. While not technically breaking, it changes the camera zoom behavior. Override the behavior using the new
zoom
andonZoom
if you want to customize how fast it zooms - Removed camera permission request on iOS and Android. This was removed due to the complexity of managing permissions on both platforms and it caused issues for some users. Using a separate permission library like zoontek's react-native-permissions is more flexible and you get to control when to prompt, show advanced dialogs, see what the status of the permission is, and re-prompt appropriately.
- Temporary path moved to "Caches" directory. This helps users of Expo's
expo-file-system
library which only allows managing files in eitherDocuments/
orLibrary/Caches
directories.
What's Changed
- Add iOS linter & report issues on PR by @DavidBertet in #634
- Add namespace to build.gradle for AGP > 7 by @stetbern in #617
- Add resize mode cover/contain by @lichstam in #644
- Added code format to see type of code scanned by @android-imdad in #633
- Added multi-lens zoom support for iPhone 12, 13, and 14 by @scarlac in #569
- Added onZoom={e => e.nativeEvent.zoom} prop event handler that triggers when users pinch to zoom
- Added rn-permissions recommendation by @scarlac in #606
- Added zoom={1.0} prop that controls zoom by @scarlac in #559
- Allow disabling the photo capture shutter sound on Android (#583) by @scarlac in #600
- Chore: add types by @Kazion500 in #505
- Chore: expose a method to toggle the torch light in Camera component by @yousrasd in https://github.com/teslamotors/react-native-
- Fix #614. "onError" method needs to be declared by @DavidBertet in #630
- Fix barcode screen top button size by @DavidBertet in #631
- Fix linting error by @DavidBertet in #570
- Fix: Correct onScale method signature in CKCamera.kt (again) by @elliottkember in #592
- Fix: Correct onScale method signature in CKCamera.kt by @coreyphillips in #551
- Fixed #517. iOS simulator pictures are PNG instead of JPEG by @DavidBertet in #548
- Fixed focusMode and zoomMode not being enabled by default
- Fixed orientation on iPads when starting in landscape mode 4892d53
- Fixed preview and capture orientation on iOS when device orientation lock is on (it will now use the accelerometer when possible, defaulting to the interface orientation)
- Fixed QR scanner not always picking up clear codes by @scarlac in #599
- Fixed viewport not rotating when device UI rotates (necessary for iPads without Stage Manager, or non-orientation locked UIs) by @summer-wu in #542
- Hide statusbar when camera is open
- Improve type definition & README by @DavidBertet in #545
- Improved expo-file-system (EXFS) support, as EXFS.moveAsync() will refuse to move files stored in the /tmp/ directory. So we now store in the Caches folder instead, specifically ~/Library/Caches//com.tesla.react-native-camera-kit/*.
- Include documentation to use expo plugin by @pettomartino in #588
- Objective-C -> Swift migration by @DavidBertet in #547
- Removed lodash as an explicit dependency 289696d
- Return height/width of capture on iOS by @DavidBertet in #646
- Update build target to iOS 11 by @elliottkember in #603
- Update example to react native ^0.71.0 by @DavidBertet in #544
- Update README.md by @aviswaroop in #582
- Update RNCameraKitModule.kt with KDoc by @dhiasaadlaui in #575
Android only
New Contributors
- @jorgepalacio made their first contribution in #493
- @yousrasd made their first contribution in #523
- @summer-wu made their first contribution in #542
- @patrickkabwe made their first contribution in #505
- @DavidBertet made their first contribution in #544
- @coreyphillips made their first contribution in #551
- @dhiasaadlaui made their first contribution in #575
- @aviswaroop made their first contribution in #582
- @elliottkember made their first contribution in #592
- @pettomartino made their first contribution in #588
- @android-imdad made their first contribution in #633
- @lichstam made their first contribution in #644
Full Changelog: v13.0.0...v14.0.0