From 5cbe01ae2d5ece05925e4010123a775565516821 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Sun, 21 Apr 2024 14:34:47 +0200 Subject: [PATCH 1/2] feat: Separate VisionCamera into `React`, `Core` and `FrameProcessors` subspecs --- package/VisionCamera.podspec | 34 ++++++++++--------- package/example/ios/Podfile.lock | 12 +++---- ...lBufferAdaptor+initWithVideoSettings.swift | 0 .../AVAudioSession+updateCategory.swift | 0 .../AVCaptureDevice+isMultiCam.swift | 0 .../AVCaptureDevice+minFocusDistance.swift | 0 .../AVCaptureDevice+neutralZoom.swift | 0 .../AVCaptureDevice+physicalDevices.swift | 0 .../AVCaptureDevice+toDictionary.swift | 0 .../AVCaptureDevice.Format+dimensions.swift | 0 .../AVCaptureDevice.Format+toDictionary.swift | 0 .../Extensions/AVCaptureOutput+mirror.swift | 0 .../AVCaptureSession+synchronizeBuffer.swift | 0 ...ptureVideoDataOutput+findPixelFormat.swift | 0 ...AVCaptureVideoDataOutput+pixelFormat.swift | 0 ...oDataOutput+recommendedVideoSettings.swift | 0 .../AVFrameRateRange+includes.swift | 0 .../Extensions/CLLocation+iso6709String.swift | 0 .../Extensions/CLLocation+toEXIF.swift | 0 .../CLLocationManager+requestAccess.swift | 0 .../CMVideoDimensions+toCGSize.swift | 0 .../Extensions/Collection+safe.swift | 0 .../Extensions/FourCharCode+toString.swift | 0 .../AVAssetWriter.Status+descriptor.swift | 0 .../AVAuthorizationStatus+descriptor.swift | 0 ....DeviceType+physicalDeviceDescriptor.swift | 0 ...AVCaptureDevice.FlashMode+descriptor.swift | 0 ...ce.Format.AutoFocusSystem+descriptor.swift | 0 .../AVCaptureDevice.Position+descriptor.swift | 0 ...AVCaptureDevice.TorchMode+descriptor.swift | 0 ...put.QualityPrioritization+descriptor.swift | 0 .../Parsers/AVFileType+descriptor.swift | 0 ...MetadataObject.ObjectType+descriptor.swift | 0 .../Parsers/AVVideoCodecType+descriptor.swift | 0 .../CLAuthorizationStatus+descriptor.swift | 0 .../{ => Core}/Parsers/EnumParserError.swift | 0 .../{ => Core}/Types/AutoFocusSystem.swift | 0 .../{ => Core}/Types/CameraDeviceFormat.swift | 0 .../{ => Core}/Types/CodeScannerOptions.swift | 0 .../ios/{ => Core}/Types/JSUnionValue.swift | 0 .../ios/{ => Core}/Types/Orientation.swift | 0 .../ios/{ => Core}/Types/PixelFormat.swift | 0 .../ios/{ => Core}/Types/QualityBalance.swift | 0 .../{ => Core}/Types/RecordVideoOptions.swift | 0 package/ios/{ => Core}/Types/ResizeMode.swift | 0 .../ios/{ => Core}/Types/ShutterType.swift | 0 package/ios/{ => Core}/Types/Torch.swift | 0 package/ios/{ => Core}/Types/Video.swift | 0 .../Types/VideoStabilizationMode.swift | 0 package/ios/{ => React}/CameraBridge.h | 0 .../ios/{ => React}/CameraDevicesManager.m | 0 .../{ => React}/CameraDevicesManager.swift | 0 .../ios/{ => React}/CameraView+Focus.swift | 0 .../{ => React}/CameraView+RecordVideo.swift | 0 .../{ => React}/CameraView+TakePhoto.swift | 0 .../{ => React}/CameraView+TakeSnapshot.swift | 0 package/ios/{ => React}/CameraView+Zoom.swift | 0 package/ios/{ => React}/CameraView.swift | 0 ...iewManager+VisionCameraProxyDelegate.swift | 0 package/ios/{ => React}/CameraViewManager.m | 0 .../ios/{ => React}/CameraViewManager.swift | 0 .../Utils}/Callback.swift | 0 .../Utils}/FileUtils.swift | 0 .../Utils}/GlobalReferenceHolder.swift | 0 .../Utils}/MakeReactError.swift | 0 .../Utils}/Promise.swift | 0 .../Utils}/VisionLogger.swift | 0 67 files changed, 24 insertions(+), 22 deletions(-) rename package/ios/{ => Core}/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift (100%) rename package/ios/{ => Core}/Extensions/AVAudioSession+updateCategory.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureDevice+isMultiCam.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureDevice+minFocusDistance.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureDevice+neutralZoom.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureDevice+physicalDevices.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureDevice+toDictionary.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureDevice.Format+dimensions.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureDevice.Format+toDictionary.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureOutput+mirror.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureSession+synchronizeBuffer.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureVideoDataOutput+findPixelFormat.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureVideoDataOutput+pixelFormat.swift (100%) rename package/ios/{ => Core}/Extensions/AVCaptureVideoDataOutput+recommendedVideoSettings.swift (100%) rename package/ios/{ => Core}/Extensions/AVFrameRateRange+includes.swift (100%) rename package/ios/{ => Core}/Extensions/CLLocation+iso6709String.swift (100%) rename package/ios/{ => Core}/Extensions/CLLocation+toEXIF.swift (100%) rename package/ios/{ => Core}/Extensions/CLLocationManager+requestAccess.swift (100%) rename package/ios/{ => Core}/Extensions/CMVideoDimensions+toCGSize.swift (100%) rename package/ios/{ => Core}/Extensions/Collection+safe.swift (100%) rename package/ios/{ => Core}/Extensions/FourCharCode+toString.swift (100%) rename package/ios/{ => Core}/Parsers/AVAssetWriter.Status+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVAuthorizationStatus+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVCaptureDevice.DeviceType+physicalDeviceDescriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVCaptureDevice.FlashMode+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVCaptureDevice.Position+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVCaptureDevice.TorchMode+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVFileType+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVMetadataObject.ObjectType+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/AVVideoCodecType+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/CLAuthorizationStatus+descriptor.swift (100%) rename package/ios/{ => Core}/Parsers/EnumParserError.swift (100%) rename package/ios/{ => Core}/Types/AutoFocusSystem.swift (100%) rename package/ios/{ => Core}/Types/CameraDeviceFormat.swift (100%) rename package/ios/{ => Core}/Types/CodeScannerOptions.swift (100%) rename package/ios/{ => Core}/Types/JSUnionValue.swift (100%) rename package/ios/{ => Core}/Types/Orientation.swift (100%) rename package/ios/{ => Core}/Types/PixelFormat.swift (100%) rename package/ios/{ => Core}/Types/QualityBalance.swift (100%) rename package/ios/{ => Core}/Types/RecordVideoOptions.swift (100%) rename package/ios/{ => Core}/Types/ResizeMode.swift (100%) rename package/ios/{ => Core}/Types/ShutterType.swift (100%) rename package/ios/{ => Core}/Types/Torch.swift (100%) rename package/ios/{ => Core}/Types/Video.swift (100%) rename package/ios/{ => Core}/Types/VideoStabilizationMode.swift (100%) rename package/ios/{ => React}/CameraBridge.h (100%) rename package/ios/{ => React}/CameraDevicesManager.m (100%) rename package/ios/{ => React}/CameraDevicesManager.swift (100%) rename package/ios/{ => React}/CameraView+Focus.swift (100%) rename package/ios/{ => React}/CameraView+RecordVideo.swift (100%) rename package/ios/{ => React}/CameraView+TakePhoto.swift (100%) rename package/ios/{ => React}/CameraView+TakeSnapshot.swift (100%) rename package/ios/{ => React}/CameraView+Zoom.swift (100%) rename package/ios/{ => React}/CameraView.swift (100%) rename package/ios/{ => React}/CameraViewManager+VisionCameraProxyDelegate.swift (100%) rename package/ios/{ => React}/CameraViewManager.m (100%) rename package/ios/{ => React}/CameraViewManager.swift (100%) rename package/ios/{React Utils => React/Utils}/Callback.swift (100%) rename package/ios/{React Utils => React/Utils}/FileUtils.swift (100%) rename package/ios/{React Utils => React/Utils}/GlobalReferenceHolder.swift (100%) rename package/ios/{React Utils => React/Utils}/MakeReactError.swift (100%) rename package/ios/{React Utils => React/Utils}/Promise.swift (100%) rename package/ios/{React Utils => React/Utils}/VisionLogger.swift (100%) diff --git a/package/VisionCamera.podspec b/package/VisionCamera.podspec index fee1c1fd12..d5d5abcd3a 100644 --- a/package/VisionCamera.podspec +++ b/package/VisionCamera.podspec @@ -51,24 +51,26 @@ Pod::Spec.new do |s| s.requires_arc = true - s.dependency "React-Core" - s.subspec 'Core' do |core| # VisionCamera Core Swift codebase - core.source_files = [ - "ios/*.{m,mm,swift}", - "ios/Core/*.{m,mm,swift}", - "ios/Extensions/*.{m,mm,swift}", - "ios/Parsers/*.{m,mm,swift}", - "ios/React Utils/*.{m,mm,swift}", - "ios/Types/*.{m,mm,swift}", - "ios/CameraBridge.h", - ] + core.source_files = "ios/Core/**/*.swift" core.pod_target_xcconfig = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" => "$(inherited) #{enableLocation ? "VISION_CAMERA_ENABLE_LOCATION" : ""}", } + end + + s.subspec 'React' do |core| + # VisionCamera React-specific Swift codebase + core.source_files = [ + "ios/React/**/*.swift", + "ios/React/**/*.{h,m}", + ] + core.public_header_files = [ + "ios/React/CameraBridge.h" + ] + core.dependency "React-Core" if enableFrameProcessors core.dependency "VisionCamera/FrameProcessors" end @@ -77,13 +79,9 @@ Pod::Spec.new do |s| if enableFrameProcessors s.subspec 'FrameProcessors' do |fp| # VisionCamera Frame Processors C++ codebase (optional) - fp.dependency "React" - fp.dependency "React-callinvoker" - fp.dependency "react-native-worklets-core" - fp.source_files = [ # C++ sources - "ios/Frame Processor/*.{h,m,mm,cpp}", + "ios/Frame Processor/**/*.{h,m,mm}", "cpp/**/*.{h,cpp}", ] fp.public_header_files = [ @@ -102,6 +100,10 @@ Pod::Spec.new do |s| "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "HEADER_SEARCH_PATHS" => "$(inherited) \"$(PODS_TARGET_SRCROOT)/cpp/\"/** " } + + fp.dependency "React" + fp.dependency "React-callinvoker" + fp.dependency "react-native-worklets-core" end end end diff --git a/package/example/ios/Podfile.lock b/package/example/ios/Podfile.lock index 140b4de631..ab2e1188a0 100644 --- a/package/example/ios/Podfile.lock +++ b/package/example/ios/Podfile.lock @@ -468,17 +468,17 @@ PODS: - React-Core - SocketRocket (0.6.1) - VisionCamera (4.0.0-beta.16): - - React-Core - VisionCamera/Core (= 4.0.0-beta.16) - VisionCamera/FrameProcessors (= 4.0.0-beta.16) - - VisionCamera/Core (4.0.0-beta.16): - - React-Core - - VisionCamera/FrameProcessors + - VisionCamera/React (= 4.0.0-beta.16) + - VisionCamera/Core (4.0.0-beta.16) - VisionCamera/FrameProcessors (4.0.0-beta.16): - React - React-callinvoker - - React-Core - react-native-worklets-core + - VisionCamera/React (4.0.0-beta.16): + - React-Core + - VisionCamera/FrameProcessors - Yoga (1.14.0) DEPENDENCIES: @@ -708,7 +708,7 @@ SPEC CHECKSUMS: RNStaticSafeAreaInsets: 055ddbf5e476321720457cdaeec0ff2ba40ec1b8 RNVectorIcons: 23b6e11af4aaf104d169b1b0afa7e5cf96c676ce SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - VisionCamera: 129f7e33050d9f45660e4510565ebbd1a0c15126 + VisionCamera: f3bb394c7c842ff1ced88ee49294b329eb6d952f Yoga: 4c3aa327e4a6a23eeacd71f61c81df1bcdf677d5 PODFILE CHECKSUM: 29d07573cd9f2aa1ecf53c481819da07fd66822e diff --git a/package/ios/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift b/package/ios/Core/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift similarity index 100% rename from package/ios/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift rename to package/ios/Core/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift diff --git a/package/ios/Extensions/AVAudioSession+updateCategory.swift b/package/ios/Core/Extensions/AVAudioSession+updateCategory.swift similarity index 100% rename from package/ios/Extensions/AVAudioSession+updateCategory.swift rename to package/ios/Core/Extensions/AVAudioSession+updateCategory.swift diff --git a/package/ios/Extensions/AVCaptureDevice+isMultiCam.swift b/package/ios/Core/Extensions/AVCaptureDevice+isMultiCam.swift similarity index 100% rename from package/ios/Extensions/AVCaptureDevice+isMultiCam.swift rename to package/ios/Core/Extensions/AVCaptureDevice+isMultiCam.swift diff --git a/package/ios/Extensions/AVCaptureDevice+minFocusDistance.swift b/package/ios/Core/Extensions/AVCaptureDevice+minFocusDistance.swift similarity index 100% rename from package/ios/Extensions/AVCaptureDevice+minFocusDistance.swift rename to package/ios/Core/Extensions/AVCaptureDevice+minFocusDistance.swift diff --git a/package/ios/Extensions/AVCaptureDevice+neutralZoom.swift b/package/ios/Core/Extensions/AVCaptureDevice+neutralZoom.swift similarity index 100% rename from package/ios/Extensions/AVCaptureDevice+neutralZoom.swift rename to package/ios/Core/Extensions/AVCaptureDevice+neutralZoom.swift diff --git a/package/ios/Extensions/AVCaptureDevice+physicalDevices.swift b/package/ios/Core/Extensions/AVCaptureDevice+physicalDevices.swift similarity index 100% rename from package/ios/Extensions/AVCaptureDevice+physicalDevices.swift rename to package/ios/Core/Extensions/AVCaptureDevice+physicalDevices.swift diff --git a/package/ios/Extensions/AVCaptureDevice+toDictionary.swift b/package/ios/Core/Extensions/AVCaptureDevice+toDictionary.swift similarity index 100% rename from package/ios/Extensions/AVCaptureDevice+toDictionary.swift rename to package/ios/Core/Extensions/AVCaptureDevice+toDictionary.swift diff --git a/package/ios/Extensions/AVCaptureDevice.Format+dimensions.swift b/package/ios/Core/Extensions/AVCaptureDevice.Format+dimensions.swift similarity index 100% rename from package/ios/Extensions/AVCaptureDevice.Format+dimensions.swift rename to package/ios/Core/Extensions/AVCaptureDevice.Format+dimensions.swift diff --git a/package/ios/Extensions/AVCaptureDevice.Format+toDictionary.swift b/package/ios/Core/Extensions/AVCaptureDevice.Format+toDictionary.swift similarity index 100% rename from package/ios/Extensions/AVCaptureDevice.Format+toDictionary.swift rename to package/ios/Core/Extensions/AVCaptureDevice.Format+toDictionary.swift diff --git a/package/ios/Extensions/AVCaptureOutput+mirror.swift b/package/ios/Core/Extensions/AVCaptureOutput+mirror.swift similarity index 100% rename from package/ios/Extensions/AVCaptureOutput+mirror.swift rename to package/ios/Core/Extensions/AVCaptureOutput+mirror.swift diff --git a/package/ios/Extensions/AVCaptureSession+synchronizeBuffer.swift b/package/ios/Core/Extensions/AVCaptureSession+synchronizeBuffer.swift similarity index 100% rename from package/ios/Extensions/AVCaptureSession+synchronizeBuffer.swift rename to package/ios/Core/Extensions/AVCaptureSession+synchronizeBuffer.swift diff --git a/package/ios/Extensions/AVCaptureVideoDataOutput+findPixelFormat.swift b/package/ios/Core/Extensions/AVCaptureVideoDataOutput+findPixelFormat.swift similarity index 100% rename from package/ios/Extensions/AVCaptureVideoDataOutput+findPixelFormat.swift rename to package/ios/Core/Extensions/AVCaptureVideoDataOutput+findPixelFormat.swift diff --git a/package/ios/Extensions/AVCaptureVideoDataOutput+pixelFormat.swift b/package/ios/Core/Extensions/AVCaptureVideoDataOutput+pixelFormat.swift similarity index 100% rename from package/ios/Extensions/AVCaptureVideoDataOutput+pixelFormat.swift rename to package/ios/Core/Extensions/AVCaptureVideoDataOutput+pixelFormat.swift diff --git a/package/ios/Extensions/AVCaptureVideoDataOutput+recommendedVideoSettings.swift b/package/ios/Core/Extensions/AVCaptureVideoDataOutput+recommendedVideoSettings.swift similarity index 100% rename from package/ios/Extensions/AVCaptureVideoDataOutput+recommendedVideoSettings.swift rename to package/ios/Core/Extensions/AVCaptureVideoDataOutput+recommendedVideoSettings.swift diff --git a/package/ios/Extensions/AVFrameRateRange+includes.swift b/package/ios/Core/Extensions/AVFrameRateRange+includes.swift similarity index 100% rename from package/ios/Extensions/AVFrameRateRange+includes.swift rename to package/ios/Core/Extensions/AVFrameRateRange+includes.swift diff --git a/package/ios/Extensions/CLLocation+iso6709String.swift b/package/ios/Core/Extensions/CLLocation+iso6709String.swift similarity index 100% rename from package/ios/Extensions/CLLocation+iso6709String.swift rename to package/ios/Core/Extensions/CLLocation+iso6709String.swift diff --git a/package/ios/Extensions/CLLocation+toEXIF.swift b/package/ios/Core/Extensions/CLLocation+toEXIF.swift similarity index 100% rename from package/ios/Extensions/CLLocation+toEXIF.swift rename to package/ios/Core/Extensions/CLLocation+toEXIF.swift diff --git a/package/ios/Extensions/CLLocationManager+requestAccess.swift b/package/ios/Core/Extensions/CLLocationManager+requestAccess.swift similarity index 100% rename from package/ios/Extensions/CLLocationManager+requestAccess.swift rename to package/ios/Core/Extensions/CLLocationManager+requestAccess.swift diff --git a/package/ios/Extensions/CMVideoDimensions+toCGSize.swift b/package/ios/Core/Extensions/CMVideoDimensions+toCGSize.swift similarity index 100% rename from package/ios/Extensions/CMVideoDimensions+toCGSize.swift rename to package/ios/Core/Extensions/CMVideoDimensions+toCGSize.swift diff --git a/package/ios/Extensions/Collection+safe.swift b/package/ios/Core/Extensions/Collection+safe.swift similarity index 100% rename from package/ios/Extensions/Collection+safe.swift rename to package/ios/Core/Extensions/Collection+safe.swift diff --git a/package/ios/Extensions/FourCharCode+toString.swift b/package/ios/Core/Extensions/FourCharCode+toString.swift similarity index 100% rename from package/ios/Extensions/FourCharCode+toString.swift rename to package/ios/Core/Extensions/FourCharCode+toString.swift diff --git a/package/ios/Parsers/AVAssetWriter.Status+descriptor.swift b/package/ios/Core/Parsers/AVAssetWriter.Status+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVAssetWriter.Status+descriptor.swift rename to package/ios/Core/Parsers/AVAssetWriter.Status+descriptor.swift diff --git a/package/ios/Parsers/AVAuthorizationStatus+descriptor.swift b/package/ios/Core/Parsers/AVAuthorizationStatus+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVAuthorizationStatus+descriptor.swift rename to package/ios/Core/Parsers/AVAuthorizationStatus+descriptor.swift diff --git a/package/ios/Parsers/AVCaptureDevice.DeviceType+physicalDeviceDescriptor.swift b/package/ios/Core/Parsers/AVCaptureDevice.DeviceType+physicalDeviceDescriptor.swift similarity index 100% rename from package/ios/Parsers/AVCaptureDevice.DeviceType+physicalDeviceDescriptor.swift rename to package/ios/Core/Parsers/AVCaptureDevice.DeviceType+physicalDeviceDescriptor.swift diff --git a/package/ios/Parsers/AVCaptureDevice.FlashMode+descriptor.swift b/package/ios/Core/Parsers/AVCaptureDevice.FlashMode+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVCaptureDevice.FlashMode+descriptor.swift rename to package/ios/Core/Parsers/AVCaptureDevice.FlashMode+descriptor.swift diff --git a/package/ios/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift b/package/ios/Core/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift rename to package/ios/Core/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift diff --git a/package/ios/Parsers/AVCaptureDevice.Position+descriptor.swift b/package/ios/Core/Parsers/AVCaptureDevice.Position+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVCaptureDevice.Position+descriptor.swift rename to package/ios/Core/Parsers/AVCaptureDevice.Position+descriptor.swift diff --git a/package/ios/Parsers/AVCaptureDevice.TorchMode+descriptor.swift b/package/ios/Core/Parsers/AVCaptureDevice.TorchMode+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVCaptureDevice.TorchMode+descriptor.swift rename to package/ios/Core/Parsers/AVCaptureDevice.TorchMode+descriptor.swift diff --git a/package/ios/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift b/package/ios/Core/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift rename to package/ios/Core/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift diff --git a/package/ios/Parsers/AVFileType+descriptor.swift b/package/ios/Core/Parsers/AVFileType+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVFileType+descriptor.swift rename to package/ios/Core/Parsers/AVFileType+descriptor.swift diff --git a/package/ios/Parsers/AVMetadataObject.ObjectType+descriptor.swift b/package/ios/Core/Parsers/AVMetadataObject.ObjectType+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVMetadataObject.ObjectType+descriptor.swift rename to package/ios/Core/Parsers/AVMetadataObject.ObjectType+descriptor.swift diff --git a/package/ios/Parsers/AVVideoCodecType+descriptor.swift b/package/ios/Core/Parsers/AVVideoCodecType+descriptor.swift similarity index 100% rename from package/ios/Parsers/AVVideoCodecType+descriptor.swift rename to package/ios/Core/Parsers/AVVideoCodecType+descriptor.swift diff --git a/package/ios/Parsers/CLAuthorizationStatus+descriptor.swift b/package/ios/Core/Parsers/CLAuthorizationStatus+descriptor.swift similarity index 100% rename from package/ios/Parsers/CLAuthorizationStatus+descriptor.swift rename to package/ios/Core/Parsers/CLAuthorizationStatus+descriptor.swift diff --git a/package/ios/Parsers/EnumParserError.swift b/package/ios/Core/Parsers/EnumParserError.swift similarity index 100% rename from package/ios/Parsers/EnumParserError.swift rename to package/ios/Core/Parsers/EnumParserError.swift diff --git a/package/ios/Types/AutoFocusSystem.swift b/package/ios/Core/Types/AutoFocusSystem.swift similarity index 100% rename from package/ios/Types/AutoFocusSystem.swift rename to package/ios/Core/Types/AutoFocusSystem.swift diff --git a/package/ios/Types/CameraDeviceFormat.swift b/package/ios/Core/Types/CameraDeviceFormat.swift similarity index 100% rename from package/ios/Types/CameraDeviceFormat.swift rename to package/ios/Core/Types/CameraDeviceFormat.swift diff --git a/package/ios/Types/CodeScannerOptions.swift b/package/ios/Core/Types/CodeScannerOptions.swift similarity index 100% rename from package/ios/Types/CodeScannerOptions.swift rename to package/ios/Core/Types/CodeScannerOptions.swift diff --git a/package/ios/Types/JSUnionValue.swift b/package/ios/Core/Types/JSUnionValue.swift similarity index 100% rename from package/ios/Types/JSUnionValue.swift rename to package/ios/Core/Types/JSUnionValue.swift diff --git a/package/ios/Types/Orientation.swift b/package/ios/Core/Types/Orientation.swift similarity index 100% rename from package/ios/Types/Orientation.swift rename to package/ios/Core/Types/Orientation.swift diff --git a/package/ios/Types/PixelFormat.swift b/package/ios/Core/Types/PixelFormat.swift similarity index 100% rename from package/ios/Types/PixelFormat.swift rename to package/ios/Core/Types/PixelFormat.swift diff --git a/package/ios/Types/QualityBalance.swift b/package/ios/Core/Types/QualityBalance.swift similarity index 100% rename from package/ios/Types/QualityBalance.swift rename to package/ios/Core/Types/QualityBalance.swift diff --git a/package/ios/Types/RecordVideoOptions.swift b/package/ios/Core/Types/RecordVideoOptions.swift similarity index 100% rename from package/ios/Types/RecordVideoOptions.swift rename to package/ios/Core/Types/RecordVideoOptions.swift diff --git a/package/ios/Types/ResizeMode.swift b/package/ios/Core/Types/ResizeMode.swift similarity index 100% rename from package/ios/Types/ResizeMode.swift rename to package/ios/Core/Types/ResizeMode.swift diff --git a/package/ios/Types/ShutterType.swift b/package/ios/Core/Types/ShutterType.swift similarity index 100% rename from package/ios/Types/ShutterType.swift rename to package/ios/Core/Types/ShutterType.swift diff --git a/package/ios/Types/Torch.swift b/package/ios/Core/Types/Torch.swift similarity index 100% rename from package/ios/Types/Torch.swift rename to package/ios/Core/Types/Torch.swift diff --git a/package/ios/Types/Video.swift b/package/ios/Core/Types/Video.swift similarity index 100% rename from package/ios/Types/Video.swift rename to package/ios/Core/Types/Video.swift diff --git a/package/ios/Types/VideoStabilizationMode.swift b/package/ios/Core/Types/VideoStabilizationMode.swift similarity index 100% rename from package/ios/Types/VideoStabilizationMode.swift rename to package/ios/Core/Types/VideoStabilizationMode.swift diff --git a/package/ios/CameraBridge.h b/package/ios/React/CameraBridge.h similarity index 100% rename from package/ios/CameraBridge.h rename to package/ios/React/CameraBridge.h diff --git a/package/ios/CameraDevicesManager.m b/package/ios/React/CameraDevicesManager.m similarity index 100% rename from package/ios/CameraDevicesManager.m rename to package/ios/React/CameraDevicesManager.m diff --git a/package/ios/CameraDevicesManager.swift b/package/ios/React/CameraDevicesManager.swift similarity index 100% rename from package/ios/CameraDevicesManager.swift rename to package/ios/React/CameraDevicesManager.swift diff --git a/package/ios/CameraView+Focus.swift b/package/ios/React/CameraView+Focus.swift similarity index 100% rename from package/ios/CameraView+Focus.swift rename to package/ios/React/CameraView+Focus.swift diff --git a/package/ios/CameraView+RecordVideo.swift b/package/ios/React/CameraView+RecordVideo.swift similarity index 100% rename from package/ios/CameraView+RecordVideo.swift rename to package/ios/React/CameraView+RecordVideo.swift diff --git a/package/ios/CameraView+TakePhoto.swift b/package/ios/React/CameraView+TakePhoto.swift similarity index 100% rename from package/ios/CameraView+TakePhoto.swift rename to package/ios/React/CameraView+TakePhoto.swift diff --git a/package/ios/CameraView+TakeSnapshot.swift b/package/ios/React/CameraView+TakeSnapshot.swift similarity index 100% rename from package/ios/CameraView+TakeSnapshot.swift rename to package/ios/React/CameraView+TakeSnapshot.swift diff --git a/package/ios/CameraView+Zoom.swift b/package/ios/React/CameraView+Zoom.swift similarity index 100% rename from package/ios/CameraView+Zoom.swift rename to package/ios/React/CameraView+Zoom.swift diff --git a/package/ios/CameraView.swift b/package/ios/React/CameraView.swift similarity index 100% rename from package/ios/CameraView.swift rename to package/ios/React/CameraView.swift diff --git a/package/ios/CameraViewManager+VisionCameraProxyDelegate.swift b/package/ios/React/CameraViewManager+VisionCameraProxyDelegate.swift similarity index 100% rename from package/ios/CameraViewManager+VisionCameraProxyDelegate.swift rename to package/ios/React/CameraViewManager+VisionCameraProxyDelegate.swift diff --git a/package/ios/CameraViewManager.m b/package/ios/React/CameraViewManager.m similarity index 100% rename from package/ios/CameraViewManager.m rename to package/ios/React/CameraViewManager.m diff --git a/package/ios/CameraViewManager.swift b/package/ios/React/CameraViewManager.swift similarity index 100% rename from package/ios/CameraViewManager.swift rename to package/ios/React/CameraViewManager.swift diff --git a/package/ios/React Utils/Callback.swift b/package/ios/React/Utils/Callback.swift similarity index 100% rename from package/ios/React Utils/Callback.swift rename to package/ios/React/Utils/Callback.swift diff --git a/package/ios/React Utils/FileUtils.swift b/package/ios/React/Utils/FileUtils.swift similarity index 100% rename from package/ios/React Utils/FileUtils.swift rename to package/ios/React/Utils/FileUtils.swift diff --git a/package/ios/React Utils/GlobalReferenceHolder.swift b/package/ios/React/Utils/GlobalReferenceHolder.swift similarity index 100% rename from package/ios/React Utils/GlobalReferenceHolder.swift rename to package/ios/React/Utils/GlobalReferenceHolder.swift diff --git a/package/ios/React Utils/MakeReactError.swift b/package/ios/React/Utils/MakeReactError.swift similarity index 100% rename from package/ios/React Utils/MakeReactError.swift rename to package/ios/React/Utils/MakeReactError.swift diff --git a/package/ios/React Utils/Promise.swift b/package/ios/React/Utils/Promise.swift similarity index 100% rename from package/ios/React Utils/Promise.swift rename to package/ios/React/Utils/Promise.swift diff --git a/package/ios/React Utils/VisionLogger.swift b/package/ios/React/Utils/VisionLogger.swift similarity index 100% rename from package/ios/React Utils/VisionLogger.swift rename to package/ios/React/Utils/VisionLogger.swift From 059849c6a5bf908554dcd5bd0488faa00908d900 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Sun, 21 Apr 2024 14:38:45 +0200 Subject: [PATCH 2/2] Split utils --- package/ios/{React => Core}/Utils/FileUtils.swift | 0 package/ios/{React => Core}/Utils/GlobalReferenceHolder.swift | 0 package/ios/{React => Core}/Utils/VisionLogger.swift | 0 .../React/CameraViewManager+VisionCameraProxyDelegate.swift | 3 +++ 4 files changed, 3 insertions(+) rename package/ios/{React => Core}/Utils/FileUtils.swift (100%) rename package/ios/{React => Core}/Utils/GlobalReferenceHolder.swift (100%) rename package/ios/{React => Core}/Utils/VisionLogger.swift (100%) diff --git a/package/ios/React/Utils/FileUtils.swift b/package/ios/Core/Utils/FileUtils.swift similarity index 100% rename from package/ios/React/Utils/FileUtils.swift rename to package/ios/Core/Utils/FileUtils.swift diff --git a/package/ios/React/Utils/GlobalReferenceHolder.swift b/package/ios/Core/Utils/GlobalReferenceHolder.swift similarity index 100% rename from package/ios/React/Utils/GlobalReferenceHolder.swift rename to package/ios/Core/Utils/GlobalReferenceHolder.swift diff --git a/package/ios/React/Utils/VisionLogger.swift b/package/ios/Core/Utils/VisionLogger.swift similarity index 100% rename from package/ios/React/Utils/VisionLogger.swift rename to package/ios/Core/Utils/VisionLogger.swift diff --git a/package/ios/React/CameraViewManager+VisionCameraProxyDelegate.swift b/package/ios/React/CameraViewManager+VisionCameraProxyDelegate.swift index d2eb45e5fc..69d93d3a82 100644 --- a/package/ios/React/CameraViewManager+VisionCameraProxyDelegate.swift +++ b/package/ios/React/CameraViewManager+VisionCameraProxyDelegate.swift @@ -9,6 +9,9 @@ import Foundation #if VISION_CAMERA_ENABLE_FRAME_PROCESSORS + /** + * A binding for implementing the protocol required by the Frame Processors runtime. + */ extension CameraViewManager: VisionCameraProxyDelegate { func getDispatchQueue() -> DispatchQueue { return CameraQueues.videoQueue