Description
Description
I get the error: 'react/debug/react_native_assert.h' file not found, React-utils/RunLoopObserver.
This is my Podfile:
# 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, '13.0'
prepare_react_native_project!
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
dynamic_frameworks = [
'Starscream',
'iProov',
'DatadogSDK',
'SwiftProtobuf',
]
pre_install do |installer|
installer.pod_targets.each do |pod|
if !dynamic_frameworks.include?(pod.name)
puts "Overriding the static_framework? method for #{pod.name}"
def pod.static_framework?;
true
end
def pod.build_type;
Pod::BuildType.static_library
end
end
end
end
target 'POK' do
use_frameworks! :linkage => :static
config = use_native_modules!
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => true,
:fabric_enabled => flags[:fabric_enabled],
:flipper_configuration => FlipperConfiguration.disabled,
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Camera', :path => "#{permissions_path}/Camera"
pod 'Permission-Contacts', :path => "#{permissions_path}/Contacts"
pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/Simon-TechForm/google-maps-ios-utils.git', :branch => 'feat/support-apple-silicon'
pod 'SRSRadialGradient', :path => '../node_modules/react-native-radial-gradient/ios'
pod 'FirebaseCoreExtension', :modular_headers => true
pod 'FirebaseInstallations', :modular_headers => true
pod 'GoogleDataTransport', :modular_headers => true
pod 'nanopb', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
$RNFirebaseAsStaticFramework = true
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
target 'POKTests' do
inherit! :complete
# Pods for testing
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
end
end
end
`sed -i -e $'s/__IPHONE_10_0/__IPHONE_13_0/' #{installer.sandbox.root}/RCT-Folly/folly/portability/Time.h`
path = "Pods/Target Support Files/Pods-POK/Pods-POK-frameworks.sh"
lines = File.readlines(path)
lines.insert(177, 'install_framework "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/hermes.framework"'+"\n")
File.write(path, lines.join, mode: "w")
end
end
### React Native Version
0.72.1
### Output of `npx react-native info`
System:
OS: macOS 13.0
CPU: (8) x64 Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz
Memory: 74.79 MB / 32.00 GB
Shell:
version: 5.8.1
path: /bin/zsh
Binaries:
Node:
version: 18.16.1
path: ~/.nvm/versions/node/v18.16.1/bin/node
Yarn:
version: 1.22.18
path: /usr/local/bin/yarn
npm:
version: 9.5.1
path: ~/.nvm/versions/node/v18.16.1/bin/npm
Watchman:
version: 2023.07.03.00
path: /usr/local/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK:
API Levels:
- "23"
- "28"
- "29"
- "30"
- "31"
- "32"
- "33"
Build Tools:
- 28.0.3
- 29.0.0
- 29.0.2
- 29.0.3
- 30.0.2
- 30.0.3
- 31.0.0
- 32.0.0
- 33.0.0
System Images:
- android-24 | Google Play Intel x86 Atom
- android-29 | Intel x86 Atom_64
- android-30 | Intel x86 Atom_64
- android-30 | Google APIs Intel x86 Atom
- android-30 | Google Play Intel x86 Atom
- android-31 | Intel x86 Atom_64
- android-33 | Google APIs Intel x86 Atom_64
- android-33 | Google Play Intel x86 Atom_64
Android NDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.1
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.1
wanted: 0.72.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
### Steps to reproduce
i migrated my app to a new clean version of a React native 0.72.1. i install my dependencies successfully using `yarn install`, then i run `pod install` successfully, but when i try to run the project on iOS, it throws me `'react/debug/react_native_assert.h' file not found` error.
Here's my package.json
{
"name": "POK",
"version": "0.0.1",
"private": true,
"scripts": {
"postinstall": "patch-package",
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.19.0",
"@react-native-clipboard/clipboard": "^1.11.2",
"@react-native-community/blur": "^4.3.2",
"@react-native-community/netinfo": "^9.4.1",
"@react-native-firebase/analytics": "^18.1.0",
"@react-native-firebase/app": "^18.1.0",
"@react-native-firebase/crashlytics": "^18.1.0",
"@react-native-firebase/messaging": "^18.1.0",
"@react-navigation/bottom-tabs": "^6.5.8",
"@react-navigation/native": "^6.1.7",
"@react-navigation/native-stack": "^6.9.13",
"@react-navigation/stack": "^6.3.17",
"axios": "^1.4.0",
"buffer": "^6.0.3",
"card-validator": "^8.1.1",
"expo-modules-core": "^1.5.4",
"fbjs": "^3.0.5",
"isomorphic-webcrypto": "^2.3.8",
"js-base64": "^3.7.5",
"lodash": "^4.17.21",
"lodash.compact": "^3.0.1",
"lodash.every": "^4.6.0",
"lodash.pick": "^4.4.0",
"lodash.values": "^4.3.0",
"lottie-ios": "3.4.1",
"lottie-react-native": "^5.1.6",
"moment-timezone": "^0.5.43",
"patch-package": "^7.0.0",
"postinstall-postinstall": "^2.1.0",
"prop-types": "^15.8.1",
"react": "18.2.0",
"react-hook-form": "^7.45.1",
"react-native": "0.72.1",
"react-native-biometrics": "^3.0.1",
"react-native-blob-util": "^0.18.3",
"react-native-bootsplash": "^4.7.4",
"react-native-calendars": "^1.1299.0",
"react-native-camera": "^4.2.1",
"react-native-confirmation-code-field": "^7.3.1",
"react-native-contacts": "^7.0.5",
"react-native-device-info": "^10.7.0",
"react-native-fast-image": "^8.6.3",
"react-native-flash-message": "^0.4.1",
"react-native-flip-card": "^3.5.7",
"react-native-geocoding": "^0.5.0",
"react-native-geolocation-service": "^5.3.1",
"react-native-gesture-handler": "^2.12.0",
"react-native-google-places-autocomplete": "^2.5.1",
"react-native-image-picker": "^5.6.0",
"react-native-jumio-mobilesdk": "https://github.com/Jumio/mobile-react.git#v4.5.0",
"react-native-keychain": "^8.1.1",
"react-native-linear-gradient": "^2.7.3",
"react-native-loading-spinner-overlay": "^3.0.1",
"react-native-localization": "^2.3.2",
"react-native-localize": "^3.0.2",
"react-native-map-clustering": "^3.4.2",
"react-native-maps": "^1.7.1",
"react-native-masked-text": "^1.13.0",
"react-native-mmkv": "^2.10.1",
"react-native-modal": "^13.0.1",
"react-native-modalize": "^2.1.1",
"react-native-pdf": "^6.7.1",
"react-native-permissions": "^3.8.3",
"react-native-qrcode-scanner": "^1.5.5",
"react-native-qrcode-svg": "^6.2.0",
"react-native-radial-gradient": "^1.1.3",
"react-native-radio-buttons": "^1.0.0",
"react-native-reanimated": "^3.3.0",
"react-native-safe-area-context": "^4.6.4",
"react-native-screens": "^3.22.1",
"react-native-skeleton-content-nonexpo": "^1.0.13",
"react-native-svg": "^13.9.0",
"react-native-toast-message": "^2.1.6",
"react-native-vector-icons": "^9.2.0",
"react-native-webview": "^13.2.2",
"react-redux": "^8.1.1",
"reanimated-bottom-sheet": "^1.0.0-alpha.22",
"redux": "^4.2.1",
"redux-logger": "^3.0.6",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.4.2",
"reselect": "^4.1.8",
"socket.io-client": "^4.7.1",
"validate.js": "^0.13.1"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@babel/runtime": "^7.20.0",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.7",
"@tsconfig/react-native": "^3.0.0",
"@types/metro-config": "^0.76.3",
"@types/react": "^18.0.24",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"babel-plugin-module-resolver": "^5.0.0",
"eslint": "^8.19.0",
"eslint-plugin-import": "^2.27.5",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.76.5",
"prettier": "^2.4.1",
"react-native-svg-transformer": "^1.0.0",
"react-test-renderer": "18.2.0",
"typescript": "4.8.4"
},
"engines": {
"node": ">=16"
}
}
Snack, code example, screenshot, or link to a repository
