React Native iOS Build Error while running in xcode

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

1reaction
sethraj14commented, Nov 18, 2022

Facing the same issue with Flipper integration.

React Native Version: 0.68.2 Flipper Version: 0.162.0

1reaction
vivekverma1993commented, Nov 18, 2022

Facing the same issue

React Native Version: 0.68.2 Flipper Version: 0.162.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native ios build failed on react-native run-ios
1 - Delete the folder node_modules and the folders of android and ios from project root: rm -rf node_modules/ ios/ android/ · 2...
Read more >
React native build failure | Apple Developer Forums
npx react-native run-ios. I get the error: error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code...
Read more >
Troubleshooting · React Native
This error indicates that the codegen script that is injected into the Xcode build pipeline has exited early. You may get this for...
Read more >
Error in building ReactNative videoSDK sample code (IOS, ...
error Failed to build iOS project. We ran “xcodebuild” command but it exited with error code 65. To debug build logs further, ...
Read more >
[Resolve]-Build Hangs While Running 'react-native run-ios'
This resolved the problem for me, Under project.workspace, there is a file called "contents.xcworkspacedata".(This can be opened from your IDE) There was a ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found