'VisionCamera/VisionCameraProxy.h' file not found, Error in ios build
package.json
"dependencies": { "@bam.tech/react-native-image-resizer": "^3.0.9", "@invertase/react-native-apple-authentication": "^2.3.0", "@likashefqet/react-native-image-zoom": "^3.0.0", "@react-native-async-storage/async-storage": "^1.23.1", "@react-native-camera-roll/camera-roll": "^7.7.0", "@react-native-community/blur": "^4.4.0", "@react-native-community/netinfo": "^11.3.1", "@react-native-community/slider": "^4.5.2", "@react-native-firebase/analytics": "^19.2.2", "@react-native-firebase/app": "^19.2.2", "@react-native-firebase/crashlytics": "^19.2.2", "@react-native-firebase/messaging": "^19.2.2", "@react-native-firebase/remote-config": "^19.2.2", "@react-native-google-signin/google-signin": "^11.0.1", "@react-navigation/bottom-tabs": "^6.5.20", "@react-navigation/native": "^6.1.17", "@react-navigation/native-stack": "^6.9.26", "@reduxjs/toolkit": "^2.2.3", "base64-arraybuffer": "^1.0.2", "expo": "^50.0.0", "i18next": "^23.10.1", "lodash": "^4.17.21", "moment": "^2.30.1", "patch-package": "^8.0.0", "react": "18.2.0", "react-content-loader": "^7.0.0", "react-i18next": "^14.1.0", "react-native": "0.73.6", "react-native-background-timer": "^2.4.1", "react-native-blob-util": "^0.19.9", "react-native-confirmation-code-field": "^7.4.0", "react-native-device-info": "^10.13.1", "react-native-dotenv": "^3.4.11", "react-native-fast-image": "^8.6.3", "react-native-fast-tflite": "^1.2.0", "react-native-gesture-handler": "^2.16.2", "react-native-image-colors": "^2.4.0", "react-native-image-crop-picker": "^0.40.3", "react-native-image-to-rgb": "^0.1.0", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-modal": "^13.0.1", "react-native-permissions": "^4.1.5", "react-native-progress": "^5.0.1", "react-native-quick-md5": "^3.0.6", "react-native-reanimated": "^3.8.1", "react-native-render-html": "^6.3.4", "react-native-safe-area-context": "^4.9.0", "react-native-screens": "^3.30.1", "react-native-splash-screen": "^3.3.0", "react-native-sqlite-storage": "^6.0.1", "react-native-svg": "^15.2.0", "react-native-toast-message": "^2.2.0", "react-native-video": "^5.2.1", "react-native-vision-camera": "^4.0.5", "react-native-worklets-core": "^1.3.3", "react-redux": "^9.1.0", "vision-camera-resize-plugin": "^3.1.0" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/babel-preset": "0.73.21", "@react-native/eslint-config": "0.73.2", "@react-native/metro-config": "0.73.5", "@react-native/typescript-config": "0.73.1", "@types/lodash": "^4.17.0", "@types/react": "^18.2.6", "@types/react-native-background-timer": "^2.0.2", "@types/react-native-sqlite-storage": "^6.0.5", "@types/react-native-video": "^5.0.20", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.6.3", "eslint": "^8.19.0", "jest": "^29.6.3", "prettier": "2.8.8", "react-test-renderer": "18.2.0", "typescript": "5.0.4" }, "engines": { "node": ">=18" }
Podfile
require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
$RNFirebaseAsStaticFramework = true
def node_require(script)
# Resolve script with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
"require.resolve(
'#{script}',
{paths: [process.argv[1]]},
)", __dir__]).strip
end
node_require('react-native/scripts/react_native_pods.rb')
node_require('react-native-permissions/scripts/setup.rb')
platform :ios, min_ios_version_supported
prepare_react_native_project!
# ⬇️ uncomment wanted permissions
setup_permissions([
# 'AppTrackingTransparency',
# 'Bluetooth',
# 'Calendars',
# 'CalendarsWriteOnly',
'Camera',
# 'Contacts',
# 'FaceID',
# 'LocationAccuracy',
# 'LocationAlways',
# 'LocationWhenInUse',
'MediaLibrary',
# 'Microphone',
# 'Motion',
# 'Notifications',
'PhotoLibrary',
# 'PhotoLibraryAddOnly',
# 'Reminders',
# 'Siri',
# 'SpeechRecognition',
# 'StoreKit',
])
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
#
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
# ```js
# module.exports = {
# dependencies: {
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
# ```
# flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'TfliteExmp' do
use_expo_modules!
post_integrate do |installer|
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
begin
expo_patch_react_imports!(installer)
rescue => e
Pod::UI.warn e
end
end
use_frameworks! :linkage => :static
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
# :flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
# target 'TfliteExmpTests' do
# inherit! :complete
# # Pods for testing
# end
post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
end
end
Error: 'VisionCamera/VisionCameraProxy.h' file not found Lib is conflicting with Firebase. please suggest a way around as firebase is required for my app.
Hi! Same problem, any updates?
Works just fine:
- on android.
- not using firebase and thus being able to remove
use_frameworks! :linkage => :static. - if only
react-native-vision-camerainstalled, but not this library.
Note: Doing what has been suggested in this answer (e.g. using any combination of pod 'XYZ', :modular_headers => true), always leads me to a 'FirebaseStorage/FirebaseStorage-Swift.h' file not found, thus I arrived at the only possible pod file working for my project with react-native-vision-camera as seen below.
This happens when using both 3.0.0 and 3.1.0 and the following pod file:
# Resolve react_native_pods.rb with node to allow for hoisting
require Pod::Executable.execute_command('node', ['-p',
'require.resolve(
"react-native/scripts/react_native_pods.rb",
{paths: [process.argv[1]]},
)', __dir__]).strip
platform :ios, min_ios_version_supported
prepare_react_native_project!
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'App' do
config = use_native_modules!
$VCEnableFrameProcessors = true
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
use_react_native!(
:path => config[:reactNativePath],
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'AppTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
end
end
@mrousavy The issue should be resolved with the merged PR. Can you release a new patch version?
done, 3.2.0
@girraj96 Please test the new version and close your issue :)