Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Error: 'userPreferredCamera' is unavailable in iOS with react-native-vision-camera 4.5.2 #3364

Open
4 of 5 tasks
uasghar-smile opened this issue Jan 14, 2025 · 1 comment
Labels
🔧 build error Issue is related to building VisionCamera in your project

Comments

@uasghar-smile
Copy link

How were you trying to build the app?

I tried to build my app with react-native-vision-camera using Xcode. Xcode verison is 14.2

Full build logs

CompileSwift normal x86_64 /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraDevicesManager.swift (in target 'VisionCamera' from project 'Pods')
    cd /Users/usamaasghar/workspace/smile-mobile-app/ios/Pods
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-frontend -c /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/AutoFocusSystem.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVAssetWriter.Status+descriptor.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVAssetWriterInputPixelBufferAdaptor+initWithVideoSettings.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVAudioSession+updateCategory.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVAuthorizationStatus+descriptor.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureConnection+orientation.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureDevice+isMultiCam.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureDevice+minFocusDistance.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureDevice+neutralZoom.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureDevice+physicalDevices.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureDevice+sensorOrientation.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureDevice+toDictionary.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVCaptureDevice.DeviceType+physicalDeviceDescriptor.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVCaptureDevice.FlashMode+descriptor.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureDevice.Format+dimensions.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureDevice.Format+toDictionary.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVCaptureDevice.Format.AutoFocusSystem+descriptor.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVCaptureDevice.Position+descriptor.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVCaptureDevice.TorchMode+descriptor.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureOutput+isMirrored.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureOutput+orientation.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureOutput+supportsVirtualRotation.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVCapturePhotoOutput.QualityPrioritization+descriptor.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureSession+synchronizeBuffer.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureVideoDataOutput+findPixelFormat.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureVideoDataOutput+pixelFormat.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVCaptureVideoDataOutput+recommendedVideoSettings.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVFileType+descriptor.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/AVFrameRateRange+includes.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVMetadataObject.ObjectType+descriptor.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/AVVideoCodecType+descriptor.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/Utils/Callback.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraConfiguration.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/CameraDeviceFormat.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraDevicesManager.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraError.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraQueues.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSession.swift -primary-file /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSession+Audio.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSession+CodeScanner.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSession+Configuration.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSession+Focus.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSession+Location.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSession+Orientation.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSession+Photo.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSession+Video.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/CameraSessionDelegate.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraView.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraView+Focus.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraView+RecordVideo.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraView+TakePhoto.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraView+TakeSnapshot.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraView+Zoom.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraViewManager.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraViewManager+VisionCameraProxyDelegate.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/CLAuthorizationStatus+descriptor.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/CLLocation+iso6709String.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/CLLocation+toEXIF.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/CLLocationManager+requestAccess.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/CMAccelerometerData+deviceOrientation.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/CMSampleBuffer+copyWithTimestampOffset.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/CMTime+inverted.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/CMVideoDimensions+toCGSize.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/CodeScannerOptions.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/Collection+safe.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Parsers/EnumParserError.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Utils/FileUtils.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/Flash.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/FourCharCode+toString.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/FpsSampleCollector.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/FpsSampleCollectorDelegate.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Utils/GlobalReferenceHolder.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/HardwareLevel.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/JSUnionValue.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/LocationProvider.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/Utils/MakeReactError.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/MetadataProvider.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/Orientation.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/OrientationManager.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/OutputOrientation.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/PhotoCaptureDelegate.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/PixelFormat.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/PreviewView.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/Utils/Promise.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/QualityBalance.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/RecordingSession.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/RecordVideoOptions.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/ResizeMode.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/ShutterType.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/Snapshot.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/TakePhotoOptions.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/TakeSnapshotOptions.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Recording/TimelineEvent.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/Torch.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Recording/Track.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Recording/TrackTimeline.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Extensions/UIApplication+interfaceOrientation.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/Video.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Types/VideoStabilizationMode.swift /Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/Core/Utils/VisionLogger.swift -supplementary-output-file-map /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/supplementaryOutputs-67 -target x86_64-apple-ios13.4-simulator -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator16.2.sdk -I /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Products/Debug-iphonesimulator/VisionCamera -F /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Products/Debug-iphonesimulator/VisionCamera -F /Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/hermes-engine/destroot/Library/Frameworks/universal -F /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Products/Debug-iphonesimulator/XCFrameworkIntermediates/hermes-engine/Pre-built -no-color-diagnostics -enable-testing -g -import-underlying-module -module-cache-path /Users/usamaasghar/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 5 -enforce-exclusivity\=checked -Onone -D DEBUG -D VISION_CAMERA_ENABLE_FRAME_PROCESSORS -D DEBUG -D VISION_CAMERA_ENABLE_FRAME_PROCESSORS -D DEBUG -D VISION_CAMERA_ENABLE_LOCATION -D COCOAPODS -serialize-debugging-options -enable-bare-slash-regex -empty-abi-descriptor -Xcc -working-directory -Xcc /Users/usamaasghar/workspace/smile-mobile-app/ios/Pods -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/RCTTypeSafety/RCTTypeSafety.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React/React-Core.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/ReactCommon/ReactCommon.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React_Codegen/React-Codegen.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React_NativeModulesApple/React-NativeModulesApple.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/folly/RCT-Folly.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/glog/glog.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/jsi/React-jsi.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/react_debug/React-debug.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/react_native_worklets_core/react-native-worklets-core.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/react_renderer_debug/React-rendererdebug.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/react_utils/React-utils.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/yoga/Yoga.modulemap -Xcc -fmodule-map-file\=/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/VisionCamera/VisionCamera.modulemap -Xcc -I/Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/VisionCamera-generated-files.hmap -Xcc -I/Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/VisionCamera-own-target-headers.hmap -Xcc -I/Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/VisionCamera-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/VisionCamera-project-headers.hmap -Xcc -I/Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Products/Debug-iphonesimulator/VisionCamera/include -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Private -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Private/VisionCamera -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/DoubleConversion -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/FBLazyVector -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/RCT-Folly -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/RCTRequired -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/RCTTypeSafety -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-Codegen -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-Core -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-NativeModulesApple -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-RCTAnimation -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-RCTBlob -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-RCTText -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-callinvoker -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-cxxreact -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-debug -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-hermes -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-jsi -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-jsiexecutor -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-jsinspector -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-logger -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-perflogger -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-rendererdebug -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-runtimeexecutor -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-runtimescheduler -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/React-utils -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/ReactCommon -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/Yoga -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/fmt -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/glog -Xcc -I/Users/usamaasghar/workspace/smile-mobile-app/ios/Pods/Headers/Public/hermes-engine -Xcc -I/Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/DerivedSources-normal/x86_64 -Xcc -I/Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/DerivedSources/x86_64 -Xcc -I/Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/DerivedSources -Xcc -DPOD_CONFIGURATION_DEBUG\=1 -Xcc -DDEBUG\=1 -Xcc -DCOCOAPODS\=1 -Xcc -DPOD_CONFIGURATION_DEBUG\=1 -Xcc -DDEBUG\=1 -Xcc -DVISION_CAMERA_ENABLE_FRAME_PROCESSORS\=true -module-name VisionCamera -frontend-parseable-output -disable-clang-spi -target-sdk-version 16.2 -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVCaptureVideoDataOutput+recommendedVideoSettings.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVFileType+descriptor.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVFrameRateRange+includes.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVMetadataObject.ObjectType+descriptor.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVVideoCodecType+descriptor.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/Callback.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraConfiguration.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraDeviceFormat.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraDevicesManager-cfbdc4135fb1632c979406c7a53f7667.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraError.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraQueues.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraSession.o -o /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraSession+Audio.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVCaptureVideoDataOutput+recommendedVideoSettings.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVFileType+descriptor.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVFrameRateRange+includes.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVMetadataObject.ObjectType+descriptor.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/AVVideoCodecType+descriptor.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/Callback.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraConfiguration.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraDeviceFormat.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraDevicesManager-cfbdc4135fb1632c979406c7a53f7667.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraError.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraQueues.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraSession.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/VisionCamera.build/Objects-normal/x86_64/CameraSession+Audio.o -index-store-path /Users/usamaasghar/Library/Developer/Xcode/DerivedData/Smile-cfeohorupsfwtzgbxrygvweuxvbh/Index.noindex/DataStore -index-system-modules

/Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraDevicesManager.swift:67:46: error: 'userPreferredCamera' is unavailable in iOS
      if let userPreferred = AVCaptureDevice.userPreferredCamera {
                                             ^~~~~~~~~~~~~~~~~~~
AVFoundation.AVCaptureDevice:4:20: note: 'userPreferredCamera' has been explicitly marked unavailable here
    open class var userPreferredCamera: AVCaptureDevice? { get set }
                   ^
/Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraDevicesManager.swift:108:27: error: type 'AVCaptureDevice.DeviceType' has no member 'external'
      deviceTypes.append(.external)
                         ~^~~~~~~~
/Users/usamaasghar/workspace/smile-mobile-app/node_modules/react-native-vision-camera/ios/React/CameraDevicesManager.swift:111:27: error: type 'AVCaptureDevice.DeviceType' has no member 'continuityCamera'
      deviceTypes.append(.continuityCamera)
                         ~^~~~~~~~~~~~~~~~

Project dependencies

"dependencies": {
    "@backpackapp-io/react-native-toast": "^0.12.1",
    "@codler/react-native-keyboard-aware-scroll-view": "^2.0.0",
    "@react-native-async-storage/async-storage": "^1.17.11",
    "@react-native-community/art": "^1.2.0",
    "@react-native-community/datetimepicker": "^8.0.1",
    "@react-native-community/geolocation": "^2.0.2",
    "@react-native-community/image-editor": "^2.3.0",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "9.3.7",
    "@react-native-firebase/analytics": "^12.4.0",
    "@react-native-firebase/app": "^12.4.0",
    "@react-native-firebase/crashlytics": "^12.4.0",
    "@react-native-firebase/perf": "^12.4.0",
    "@react-native-picker/picker": "^2.8.1",
    "@react-navigation/elements": "^1.3.21",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/stack": "^6.3.16",
    "@reduxjs/toolkit": "^1.6.1",
    "@shopify/react-native-skia": "^1.4.2",
    "@types/react-native": "^0.64.13",
    "axios": "^1.4.0",
    "card-validator": "^8.1.1",
    "content-disposition": "^0.5.3",
    "dayjs": "^1.10.6",
    "deprecated-react-native-prop-types": "^5.0.0",
    "haversine-distance": "^1.2.1",
    "lodash": "^4.17.21",
    "lottie-react-native": "^6.7.0",
    "moment": "^2.29.1",
    "prop-types": "^15.7.2",
    "react": "18.2.0",
    "react-hook-form": "^7.17.4",
    "react-native": "0.73.0",
    "react-native-animated-loader": "0.0.9",
    "react-native-app-intro-slider": "^4.0.4",
    "react-native-base64": "^0.2.1",
    "react-native-blob-util": "^0.19.11",
    "react-native-branch": "^5.4.0",
    "react-native-circle-list": "^0.1.33",
    "react-native-circle-slider": "^2.8.0",
    "react-native-circles": "^1.0.1",
    "react-native-circular-slider": "^1.0.1",
    "react-native-collapsible": "^1.6.0",
    "react-native-config": "^1.4.3",
    "react-native-date-picker": "^4.2.5",
    "react-native-datepicker": "^1.7.2",
    "react-native-device-info": "^8.1.3",
    "react-native-document-picker": "^9.3.0",
    "react-native-dropdown-picker": "^5.4.6",
    "react-native-dropdown-select-list": "^2.0.5",
    "react-native-email-link": "^1.13.1",
    "react-native-fbsdk-next": "^10.0.0",
    "react-native-fs": "^2.18.0",
    "react-native-geocoding": "^0.5.0",
    "react-native-geolocation-service": "^5.3.1",
    "react-native-gesture-handler": "^2.20.0",
    "react-native-get-random-values": "^1.11.0",
    "react-native-google-places-autocomplete": "^2.5.6",
    "react-native-image-crop-tools": "^1.3.6",
    "react-native-image-picker": "^5.7.0",
    "react-native-indicators": "^0.17.0",
    "react-native-iphone-x-helper": "^1.3.1",
    "react-native-keyboard-aware-scroll-view": "^0.9.1",
    "react-native-launch-navigator": "^1.0.8",
    "react-native-linear-gradient": "^2.6.2",
    "react-native-maps": "1.13.2",
    "react-native-mask-input": "^1.0.3",
    "react-native-network-bandwith-speed": "^3.0.0",
    "react-native-onboarding-swiper": "^1.1.4",
    "react-native-onesignal": "^5.1.1",
    "react-native-otp-autocomplete": "^1.0.7",
    "react-native-otp-verify": "^1.1.8",
    "react-native-pdf": "6.7.5",
    "react-native-permissions": "^3.1.0",
    "react-native-progress": "^4.1.2",
    "react-native-raw-bottom-sheet": "^2.2.1",
    "react-native-reanimated": "^3.15.4",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "^4.10.5",
    "react-native-screens": "3.29.0",
    "react-native-segmented-round-display": "^1.0.0",
    "react-native-share": "^10.2.1",
    "react-native-shimmer-placeholder": "^2.0.8",
    "react-native-simple-image-cropper": "^3.2.1",
    "react-native-smartlook-analytics": "2.1.15",
    "react-native-snackbar": "^2.4.0",
    "react-native-svg": "^15.6.0",
    "react-native-svg-transformer": "^1.5.0",
    "react-native-system-navigation-bar": "^2.6.4",
    "react-native-tab-view": "^3.0.1",
    "react-native-tracking-transparency": "^0.1.1",
    "react-native-vision-camera": "4.5.2",
    "react-native-worklets-core": "^1.3.3",
    "react-native-zendesk-messaging": "^0.1.1",
    "react-navigation-stack": "^2.10.4",
    "react-redux": "^7.2.4",
    "redux-devtools-extension": "^2.13.9",
    "redux-persist": "^6.0.0",
    "rn-snackbar": "^1.0.7",
    "sp-react-native-in-app-updates": "^1.3.1",
    "styled-components": "^5.3.1",
    "utf8": "^3.0.0",
    "vision-camera-dynamsoft-document-normalizer": "^3.2.2",
    "yarn": "^1.22.19"
  },

VisionCamera Version

4.5.2

Target platforms

iOS

Operating system

MacOS

Can you build the VisionCamera Example app?

Yes, I can successfully build the Example app here

Additional information

@uasghar-smile uasghar-smile added the 🔧 build error Issue is related to building VisionCamera in your project label Jan 14, 2025
@maintenance-hans maintenance-hans bot changed the title Error: 'userPreferredCamera' is unavailable in iOS with react-native-vision-camera 4.5.2 🔧 Error: 'userPreferredCamera' is unavailable in iOS with react-native-vision-camera 4.5.2 Jan 14, 2025
Copy link

Guten Tag, Hans here! 🍻 It looks like you are running into some issues with react-native-vision-camera on iOS, specifically with those compiler errors.

Based on your detailed report, it seems there might be some changes in the AVCaptureDevice API that could be causing these errors. Make sure that you are using the correct and latest version of the library that supports your iOS version. Just also check the documentation for any breaking changes.

If the issue persists, please provide the version of Xcode you are using, and ensure your project setup follows the installation steps correctly. This will help mrousavy pinpoint the problem better!

Danke!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 build error Issue is related to building VisionCamera in your project
Projects
None yet
Development

No branches or pull requests

1 participant