Open toscalivia83 opened 5 months ago
:warning: | Newer Version of React Native is Available! |
---|---|
:information_source: | You are on a supported minor version, but it looks like there's a newer patch available - 0.73.2. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |
This is happening on our CI environment as well when we updated to xcode15, locally it works however we get the exact same error in our CI building the app
I think this happened to me as well after updating to xcode 15. I tried updating to Xcode 15.2, but it doesn't work either. I'll try downgrading Xcode maybe. If you find any fix let me know
However I keep having this error I logged here
Tried downgrading to Xcode 14.3.1 but it's not compatible with MacOS Sonoma 14.1.1.
I upgraded MacOS to 14.2.1, it did not change anything except that it now complains with error from RCTSettingsManager
file:
.../node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:10:9: fatal error: 'FBReactNativeSpec/FBReactNativeSpec.h' file not found
#import <FBReactNativeSpec/FBReactNativeSpec.h>
I also tried downgrading to RN 0.71.7 as it worked with this version before but it didn't do the job.
It doesn't work either if I run with react-native run-ios
for me, with the exact same error.
Were you saying it works for you locally @Alcoholic-Obelix ?
@cipolleschi do you have any idea what to do to fix this error ? π
@toscalivia83 sorry to hear that you are having troubles.
The problem is in your podfile.
1st, remove these chunks. Our react_native_post_install
does that for you already:
def fix_library_search_paths(installer)
def fix_config(config)
lib_search_paths = config.build_settings["LIBRARY_SEARCH_PATHS"]
if lib_search_paths
if lib_search_paths.include?("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)") || lib_search_paths.include?("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
# $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME) causes problem with Xcode 12.5 + arm64 (Apple M1)
# since the libraries there are only built for x86_64 and i386.
lib_search_paths.delete("$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)")
lib_search_paths.delete("\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"")
if !(lib_search_paths.include?("$(SDKROOT)/usr/lib/swift") || lib_search_paths.include?("\"$(SDKROOT)/usr/lib/swift\""))
# however, $(SDKROOT)/usr/lib/swift is required, at least if user is not running CocoaPods 1.11
lib_search_paths.insert(0, "$(SDKROOT)/usr/lib/swift")
end
end
end
end
def _apply_Xcode_14_3_RC_post_install_workaround(installer)
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
current_target = config.build_settings['IPHONEOS_DEPLOYMENT_TARGET']
minimum_target = '13.0'
if current_target.to_f < minimum_target.to_f
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
end
projects = installer.aggregate_targets
.map{ |t| t.user_project }
.uniq{ |p| p.path }
.push(installer.pods_project)
projects.each do |project|
project.build_configurations.each do |config|
fix_config(config)
end
project.native_targets.each do |target|
target.build_configurations.each do |config|
fix_config(config)
end
end
project.save()
end
end
Then, remove these chunks. Either our react_native_post_install
does that for you already or they are not required anymore:
installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
end
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
config.build_settings['CODE_SIGN_IDENTITY'] = ''
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
If the problem persists, it means that one of your 3rd party dependency is not properly configured.
My suggestion, in this case, is to try and isolate what it is. So, let's start from a clean 0.73 project and let's add one dependency at a time to see what make the build stop working. Once we identify the dependency, we can try to understand why and work on a solution! :D
Tried downgrading to Xcode 14.3.1 but it's not compatible with MacOS Sonoma 14.1.1. I upgraded MacOS to 14.2.1, it did not change anything except that it now complains with error from
RCTSettingsManager
file:.../node_modules/react-native/Libraries/Settings/RCTSettingsManager.mm:10:9: fatal error: 'FBReactNativeSpec/FBReactNativeSpec.h' file not found #import <FBReactNativeSpec/FBReactNativeSpec.h>
I also tried downgrading to RN 0.71.7 as it worked with this version before but it didn't do the job.
It doesn't work either if I run with
react-native run-ios
for me, with the exact same error. Were you saying it works for you locally @Alcoholic-Obelix ?@cipolleschi do you have any idea what to do to fix this error ? π
Yes, i have no problems running directly in xcode 15. Only in our CI environment. @cipolleschi my podfile is pretty barebones any guesses on why this could be happening and not with other xcode versions?
@Alcoholic-Obelix if you can run your app locally but it fails on CI, can you try to point out the differences between the two? Perhaps you are building with different versions of Xcode, macOS or with different machines... It's really hard to help out not having logs or further details.
Can you set up a job in your CI to create and build a new React Native app from scratch?
Thanks for your answer @cipolleschi !
I tried updating the Podfile to this version above and running it on my real device but it still gives me this error 'FBReactNativeSpec/FBReactNativeSpec.h' file not found
in React-RCTVibration π€―
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '13.0'
prepare_react_native_project!
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'XXX' do
config = use_native_modules!
use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
use_react_native!(:path => config[:reactNativePath], :hermes_enabled => false)
pod 'react-native-config/Extension', :path => '../node_modules/react-native-config'
# pod 'RNFBFunctions', :path => '../node_modules/@react-native-firebase/functions'
# pod 'Firebase', :modular_headers => true
# pod 'Firebase/Storage', :modular_headers => true
# pod 'FirebaseCore', :modular_headers => true
# pod 'FirebaseCoreInternal', :modular_headers => true
# pod 'GoogleUtilities', :modular_headers => true
# pod 'FirebaseAppCheckInterop', :modular_headers => true
# pod 'FirebaseAuthInterop', :modular_headers => true
# pod 'FirebaseCoreExtension', :modular_headers => true
# pod 'GTMSessionFetcher', :modular_headers => true
target 'XXXTests' do
inherit! :complete
# Pods for testing
end
# Enables Flipper.
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable these next few lines.
# use_flipper!
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,
# :ccache_enabled => true
)
end
end
target 'XXX-tvOS' do
# Pods for XXX-tvOS
target 'XXX-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
workspace 'XXX.xcworkspace'
Can you please:
I don't think that the problem is with React-RCTVibration...
@cipolleschi unfortunately it really is the only error
@toscalivia83 go to Report Navigator (last icon) and check the errors of that build pls
@Alcoholic-Obelix if you can run your app locally but it fails on CI, can you try to point out the differences between the two? Perhaps you are building with different versions of Xcode, macOS or with different machines... It's really hard to help out not having logs or further details.
Can you set up a job in your CI to create and build a new React Native app from scratch?
The versions all match, that's gonna be tough inside my organization but i'll try. Thank you!
@Alcoholic-Obelix the error of that build is the one mentioned at the top in "Stacktrace or Logs". It did not change
Actually I made a mistake at some point and was running my project with the .xcodeproject.
Now that I'm running it with .xcworkspace it displays the error 'React/RCTBridgeDelegate.h' file not found
in AppDelegate
@cipolleschi I'm trying to create a new RN project and it seems there are problems with some of the dependencies from react-native-firebase. Starting by @react-native-firebase/app
which was complaining about
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
I added:
pod 'Firebase', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
and it fixed it.
Then for @react-native-firebase/auth
I'm getting this error I don't know how to fix yet
### Command
/opt/homebrew/lib/ruby/gems/3.2.0/bin/pod install
### Report
* What did you do?
* What did you expect to happen?
* What happened instead?
### Stack
CocoaPods : 1.12.1 Ruby : ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22] RubyGems : 3.4.10 Host : macOS 14.2.1 (23C71) Xcode : 15.2 (15C500b) Git : git version 2.39.3 (Apple Git-145) Ruby lib dir : /opt/homebrew/Cellar/ruby/3.2.2/lib Repositories : trunk - CDN - https://cdn.cocoapods.org/
### Plugins
cocoapods-deintegrate : 1.0.5 cocoapods-plugins : 1.0.0 cocoapods-search : 1.0.1 cocoapods-trunk : 1.6.0 cocoapods-try : 1.2.0
### Podfile
```ruby
# 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!
# 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 'AwesomeWORKINGProject' do
config = use_native_modules!
pod 'Firebase', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
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 'AwesomeWORKINGProjectTests' 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
LoadError - dlopen(/opt/homebrew/lib/ruby/gems/3.2.0/gems/ffi-1.16.3/lib/ffi_c.bundle, 0x0009): tried: '/opt/homebrew/lib/ruby/gems/3.2.0/gems/ffi-1.16.3/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/ruby/gems/3.2.0/gems/ffi-1.16.3/lib/ffi_c.bundle' (no such file), '/opt/homebrew/lib/ruby/gems/3.2.0/gems/ffi-1.16.3/lib/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')) - /opt/homebrew/lib/ruby/gems/3.2.0/gems/ffi-1.16.3/lib/ffi_c.bundle
<internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ffi-1.16.3/lib/ffi.rb:5:in `rescue in <top (required)>'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ffi-1.16.3/lib/ffi.rb:2:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ethon-0.16.0/lib/ethon.rb:3:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/typhoeus-1.4.1/lib/typhoeus.rb:2:in `<top (required)>'
<internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
<internal:/opt/homebrew/Cellar/ruby/3.2.2/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/cdn_source.rb:440:in `download_typhoeus_impl_async'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/cdn_source.rb:372:in `download_and_save_with_retries_async'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/cdn_source.rb:365:in `download_file_async'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/cdn_source.rb:338:in `download_file'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/cdn_source.rb:284:in `ensure_versions_file_loaded'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/cdn_source.rb:208:in `search'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-core-1.12.1/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:165:in `search_for'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:267:in `each'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:267:in `sort_by'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:267:in `sort_by!'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:94:in `resolve'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/analyzer.rb:1082:in `block in resolve_dependencies'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:422:in `analyze'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:162:in `install!'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.12.1/bin/pod:55:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.2.0/bin/pod:25:in `load'
/opt/homebrew/lib/ruby/gems/3.2.0/bin/pod:25:in `<main>'
βββ TEMPLATE END ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[!] Oh no, an error occurred.
Search for existing GitHub issues similar to yours:
https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2Fopt%2Fhomebrew%2Flib%2Fruby%2Fgems%2F3.2.0%2Fgems%2Fffi-1.16.3%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+tried%3A+%27%2Fopt%2Fhomebrew%2Flib%2Fruby%2Fgems%2F3.2.0%2Fgems%2Fffi-1.16.3%2Flib%2Fffi_c.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27x86_64%27%2C+need+%27arm64%27%29%29%2C+%27%2FSystem%2FVolumes%2FPreboot%2FCryptexes%2FOS%2Fopt%2Fhomebrew%2Flib%2Fruby%2Fgems%2F3.2.0%2Fgems%2Fffi-1.16.3%2Flib%2Fffi_c.bundle%27+%28no+such+file%29%2C+%27%2Fopt%2Fhomebrew%2Flib%2Fruby%2Fgems%2F3.2.0%2Fgems%2Fffi-1.16.3%2Flib%2Fffi_c.bundle%27+%28mach-o+file%2C+but+is+an+incompatible+architecture+%28have+%27x86_64%27%2C+need+%27arm64%27%29%29+-+%2Fopt%2Fhomebrew%2Flib%2Fruby%2Fgems%2F3.2.0%2Fgems%2Fffi-1.16.3%2Flib%2Fffi_c.bundle&type=Issues
If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new
Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md
Don't forget to anonymize any private data!
Looking for related issues on cocoapods/cocoapods...
Searching for inspections failed: undefined method `map' for nil:NilClass
Any idea how to fix this?
Then I'll have these dependencies to add and I'll be done: @react-native-firebase/firestore @react-native-firebase/analytics @react-native-firebase/functions @react-native-firebase/messaging @react-native-firebase/storage
If it gives you any idea on what I can do to make it work let me know!
I created a new repo and had to update a lot of dependencies on ios and android. The ones which were creating problemes were the ones from firebase (auth, messaging, firestore), I had to upgrade react-native-vector-icons in ios, and I had problems with the version of stripe in ios and Android, and reinstall as normal dependency @babel/runtime.
These are the versions I use now:
"dependencies": {
"@babel/runtime": "^7.23.8",
"@bam.tech/react-native-image-resizer": "^3.0.7",
"@notifee/react-native": "^7.8.2",
"@react-native-async-storage/async-storage": "^1.15.9",
"@react-native-clipboard/clipboard": "^1.11.2",
"@react-native-community/datetimepicker": "6.7.3",
"@react-native-firebase/analytics": "^18.7.3",
"@react-native-firebase/app": "^18.7.3",
"@react-native-firebase/auth": "^18.7.3",
"@react-native-firebase/firestore": "^18.7.3",
"@react-native-firebase/functions": "^18.7.3",
"@react-native-firebase/messaging": "^18.7.3",
"@react-native-firebase/storage": "^18.7.3",
"@react-native-picker/picker": "^2.6.1",
"@stripe/stripe-react-native": "^0.35.0",
"firebase": "^10.7.1",
"react": "18.2.0",
"react-native": "0.73.2",
"react-native-app-intro-slider": "^4.0.4",
"react-native-calendars": "^1.1284.0",
"react-native-chart-kit": "^6.12.0",
"react-native-config": "^1.4.5",
"react-native-document-picker": "^8.1.3",
"react-native-gesture-handler": "^1.10.3",
"react-native-google-places-autocomplete": "^2.2.0",
"react-native-image-crop-picker": "^0.40.2",
"react-native-vector-icons": "^10.0.3"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/preset-env": "^7.20.0",
"@react-native-picker/picker": "^2.2.1",
"@react-native/babel-preset": "0.73.19",
"@react-native/eslint-config": "0.73.2",
"@react-native/metro-config": "0.73.3",
"@react-native/typescript-config": "0.73.1",
"@react-navigation/bottom-tabs": "^5.11.15",
"@react-navigation/native": "^5.9.8",
"@react-navigation/stack": "^5.12.8",
"@sentry/react-native": "^4.15.2",
"@tanstack/query-async-storage-persister": "^4.29.5",
"@tanstack/react-query": "^4.29.5",
"@tanstack/react-query-persist-client": "^4.29.5",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"AsyncStorage": "^0.1.5",
"babel-jest": "^29.6.3",
"dayjs": "^1.11.8",
"eslint": "^8.19.0",
"i18next": "^21.3.3",
"jest": "^29.6.3",
"moment": "^2.29.1",
"numeral": "^2.0.6",
"prettier": "2.8.8",
"qs": "^6.10.4",
"react-i18next": "^11.13.0",
"react-native-image-crop-picker": "^0.39.0",
"react-native-image-viewing": "^0.2.2",
"react-native-localize": "^2.1.5",
"react-native-maps": "^0.27.1",
"react-native-modal-datetime-picker": "^13.1.2",
"react-native-push-notification": "^8.1.1",
"react-native-safe-area": "^0.5.1",
"react-native-safe-area-context": "^3.3.2",
"react-native-screens": "^2.18.1",
"react-native-svg": "^13.9.0",
"react-native-swipe-gestures": "^1.0.5",
"react-native-web": "0.19.4",
"react-native-webview": "^13.6.2",
"react-test-renderer": "18.2.0",
"typescript": "5.0.4"
},
"engines": {
"node": ">=18"
}
And my Podfile is pretty simple:
# 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!
# 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
flipper_config = FlipperConfiguration.disabled
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
use_frameworks! :linkage => :static
target 'XXX' do
config = use_native_modules!
# pod 'Firebase', :modular_headers => true
# pod 'GoogleUtilities', :modular_headers => true
# pod 'FirebaseCore', :modular_headers => true
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 'XXXTests' 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
Good luck if you're stuck with this!
to understand @toscalivia83, did creating a new repo fixed the problem or is it still there?
Removing the build folder works for me
remove in ios folder: /build /Pods /Podfile.lock
then run - cd ios
&& pod install --repo-update
and run the project with Xcode again
@cipolleschi Creating a new repo helped me to fix the problem because I could add all the dependencies one by one and upgrade the versions. Now it works with the package.json and Podfile I posted above. Thanks for your help so far! π
@DanielJaimes unfortunately I tried that but it did not work for me
Description
Hello, i'm getting this error
'FBReactNativeSpec/FBReactNativeSpec.h' file not found
with the stacktrace below.Podfile
And these are the dependencies I'm using in my package.json:
This does not work with RN version 0.71.7 or latest version 0.73.0.
This works correctly on Android though.
Sorry I'm not sure if this is what was expected from the reproducer, let me know if I need to update anything
Do you have any idea why I got this error and how to fix it? Thanks in advance for your help ππ»
Steps to reproduce
React Native Version
0.73.0
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs