Quantcast
Channel: Active questions tagged cocoapods - Stack Overflow
Viewing all articles
Browse latest Browse all 1016

Xcode “Could not build module _____” errors across system modules when building React Native iOS app with Firebase

$
0
0

Would anybody happen to have a tiny bit of compassion for very new and inexperienced coder and have some insights about how to fix these errors?

I’m trying to build a React Native app for the first time using Xcode (v16.2 on macOS Sonoma, Apple Silicon M1). After running npx pod-install and opening the .xcworkspace file in Xcode, I encounter multiple “Could not build module ____” errors when I attempt to build the iOS target.

⸻ Desired Behavior:

I expect the Xcode project to build successfully so I can run the app in the iOS Simulator.

⸻ What I’ve Done: • Running on macOS Sonoma, Apple M1 MacBook Air • Using Xcode 16.2 (Build 16C5032a) • CocoaPods installed (pod --version: 1.14.3) • React Native 0.73.x (modular Firebase setup) • Cleared DerivedData • Ran pod deintegrate, pod install, and npx pod-install • Reinstalled Xcode + CLI tools • Verified a new empty SwiftUI project builds fine • Added use_frameworks! :linkage => :static for Firebase compatibility

⸻ Podfile

platform :ios, '16.0' use_modular_headers!

require_relative '../node_modules/react-native/scripts/react_native_pods' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'Sfir2' do config = use_native_modules!

Use static frameworks to avoid conflicts with Swift linking

use_frameworks! :linkage => :static $RNFirebaseAsStaticFramework = true

use_react_native!( :path => config[:reactNativePath], :hermes_enabled => true )

--- Firebase Modular SDK ---

pod 'FirebaseCore' pod 'FirebaseAuth' pod 'FirebaseFirestore' # ← remove this if you don't use Firestore pod 'FirebaseMessaging' # ← remove if you don’t use push notifications

post_install do |installer| react_native_post_install(installer) installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0' end end end end

❌▸ Could not build Objective-C module 'Accessibility'❌▸ Could not build module 'runetype'❌▸ Could not build module '_Builtin_stdint'❌▸ Could not build module 'sys_types'❌▸ Could not build module 'sys_wait'❌▸ Could not build module '_errno'❌▸ Could not build module '_wctype'❌▸ Could not build module '_wctype'❌▸ Could not build module '_locale'❌▸ Could not build module 'CoreGraphics'❌▸ Could not build module 'CoreFoundation'❌▸ Could not build module '_Builtin_stdint'❌▸ Could not build module 'sys_types'❌▸ Could not build module '_ctype'❌▸ Could not build module 'Darwin'❌▸ Could not build module 'CoreFoundation'❌▸ Could not build module '_time'❌▸ Could not build module '_inttypes'❌▸ Could not build module '_limits'❌▸ Redefinition of module 'Firebase'❌▸ Could not build module 'sys_types'❌▸ Could not build module '_Builtin_limits'❌▸ Could not build module '_Builtin_stdint'❌▸ Could not build module '_sys_select'❌▸ Could not build module 'sys_types'❌▸ Could not build module '_Builtin_stdint'❌▸ Could not build module '_stdint'❌▸ Could not build module '_math'❌▸ Could not build module '_time'❌▸ Could not build module 'netinet_in'❌▸ Could not build module '_stdio'❌▸ Could not build module 'sys_types'❌▸ Could not build module 'sys_types'❌▸ Could not build module 'os_object'

These appear to affect multiple standard system modules and some Firebase modules. This prevents compilation entirely.

What could be causing these “Could not build module” errors in system modules, and how can I resolve them?

Is there a known issue with React Native + Firebase modular SDK on Xcode 16.2 or M1 Macs?


Viewing all articles
Browse latest Browse all 1016

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>