2d66d5893c
* docs: New V3 docs for new API * fix: Prefer Wide-Angle unless explicitly opted-out * docs: Update DEVICES * Finish Devices docs * Switch links * Revert "Switch links" This reverts commit 06f196ae0e67787cbd5768e125be6d0a3cb5bbc9. * docs: New LIFECYCLE * docs: New CAPTURING docs * Update Worklets links * docs: Update TROUBLESHOOTING and ZOOMING * fix: Update `getAvailableCameraDevices()` usages * docs: Update FORMATS * Update Errors.kt * docs: Fix broken links * docs: Update references to old hooks * docs: Create Frame Processor Tips * docs: Auto-dark mode * fix: Fix FPS filter * feat: Add `'max'` flag to format filter * fix: Use loop * fix: Fix bug in `getCameraFormat` * fix: Find best aspect ratio as well * fix: Switch between formats on FPS change * Update FRAME_PROCESSOR_PLUGIN_LIST.mdx * Add FPS graph explanation * feat: Support HDR filter * docs: Add HDR docs * docs: Add Video Stabilization * docs: Update Skia docs * Skia links * Add Skia labels * Update SKIA_FRAME_PROCESSORS.mdx * docs: Add Performance * Update some wording * Update headers / and zoom * Add examples for devices * fix highlights * fix: Expose `Frame` * docs: Update FP docs * Update links * Update FRAME_PROCESSOR_CREATE_PLUGIN_IOS.mdx |
||
---|---|---|
.. | ||
Extensions | ||
Frame Processor | ||
Parsers | ||
React Utils | ||
Types | ||
VisionCamera.xcodeproj | ||
.swift-version | ||
.swiftformat | ||
.swiftlint.yml | ||
CameraBridge.h | ||
CameraDevicesManager.m | ||
CameraDevicesManager.swift | ||
CameraError.swift | ||
CameraQueues.swift | ||
CameraView.swift | ||
CameraView+AVAudioSession.swift | ||
CameraView+AVCaptureSession.swift | ||
CameraView+Focus.swift | ||
CameraView+Orientation.swift | ||
CameraView+RecordVideo.swift | ||
CameraView+TakePhoto.swift | ||
CameraView+Torch.swift | ||
CameraView+Zoom.swift | ||
CameraViewManager.m | ||
CameraViewManager.swift | ||
PhotoCaptureDelegate.swift | ||
PreviewView.swift | ||
README.md | ||
RecordingSession.swift |
ios
This folder contains the iOS-platform-specific code for react-native-vision-camera.
Prerequesites
- Install Xcode tools
xcode-select --install
- Install need SwiftFormat and SwiftLint
brew install swiftformat swiftlint
Getting Started
It is recommended that you work on the code using the Example project (example/ios/VisionCameraExample.xcworkspace
), since that always includes the React Native header files, plus you can easily test changes that way.
You can however still edit the library project here by opening VisionCamera.xcodeproj
, this has the advantage of automatically formatting your Code (swiftformat) and showing you Linter errors (swiftlint) when trying to build (⌘+B).
Committing
Before committing, make sure that you're not violating the Swift or C++ codestyles. To do that, run the following command:
yarn check-ios
This will also try to automatically fix any errors by re-formatting the Swift code.