react-native: React Native iOS Build Error while running in xcode

Description

While building react native app (running in real time device) by xcode, I am getting following major issues -

  • redefinition of module fmt
  • redefinition of module folly
  • Could not build module ‘_Builtin_stddef_max_align_t’
  • Could not build module ‘Darwin’
  • Could not build module ‘CoreFoundation’
  • Could not build module ‘Foundation’

I have cleaned pod cache for several times by following the below steps -

  1. cd ios && m -rf ~/Library/Caches/CocoaPods && cd …
  2. cd ios && rm -rf Pods && cd …
  3. cd ios && rm -rf ~/Library/Developer/Xcode/DerivedData/* && cd …
  4. cd ios && pod deintegrate && cd …
  5. cd ios && pod setup && cd …
  6. cd ios && pod install && cd …

And then after cleaning build folder in xcode, again rebuild the project in xcode but still getting these issues and project not getting run in either of real time device or the ios simulator.

Please help !!!

Version

0.67.4

Output of npx react-native info

info Fetching system and libraries information… System: OS: macOS 12.5.1 CPU: (4) x64 Intel® Core™ i5-6360U CPU @ 2.00GHz Memory: 169.70 MB / 8.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 14.17.0 - /usr/local/bin/node Yarn: Not Found npm: 8.19.3 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: Not Found IDEs: Android Studio: 4.2 AI-202.7660.26.42.7486908 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.4 => 0.67.4 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

  1. Clean Build folder in xcode
  2. Run in real device

Snack, code example, screenshot, or link to a repository

My code zip attached as reference - https://www.transfernow.net/dl/20221107KoG6BOHk

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 11
  • Comments: 17

Most upvoted comments

these are my errors:

Screenshot 2023-05-25 at 12 23 06

RN - 0.71.7 Flipper - 0.125.0

any idea?

Same issue here: RN - 0.71.7 Flipper - 0.125.0

It’s getting harder and harder to update even minor RN version through years…

:flipper_configuration => FlipperConfiguration.enabled,

comment following line in pod file then install pod again.

Facing the same issue

React Native Version: 0.68.2 Flipper Version: 0.162.0

I have been at it for 3 days, I’m stuck on this issue - anybody have ideas?

It started after I upgraded my Mac OS ( Sequoia 15.2) and xCode (16.2).

My React Native version is 0.72.9 (Was running fine on xCode 15 / the previous OS…

Facing the same issue with Flipper integration.

React Native Version: 0.68.2 Flipper Version: 0.162.0