react-native: 0.60.0 build failed with Error code 65 [IOS]
First , I tried to manually update one of my project from 0.57.8 to 0.60.0
following Update Helper
. I got :
/Users/ravipiyush/opensource/latest/ios/latest/AppDelegate.h:8:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
info
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening latest.xcodeproj. Run CLI with --verbose flag for more details.
Then I tried with a fresh project and got the same results !!!
React Native version:
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-5250U CPU @ 1.60GHz
Memory: 174.38 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.0.0 - /usr/local/bin/node
Yarn: 1.15.2 - ~/.yarn/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
Build Tools: 22.0.1, 23.0.1, 23.0.2, 24.0.0, 24.0.2, 24.0.3, 25.0.0, 25.0.2, 25.0.3, 26.0.1, 26.0.3, 27.0.2, 27.0.3, 28.0.1, 28.0.3
System Images: android-23 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5264788
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.0 => 0.60.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Steps To Reproduce
- react-native init Myapp
- react-native run-ios
Describe what you expected to happen:
Project Successfully builds.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 19
- Comments: 31 (3 by maintainers)
Commits related to this issue
- React Native sync for revisions 54f297a...ab075a2 Summary: This sync includes the following changes: - **[ab075a232](https://github.com/facebook/react/commit/ab075a232 )**: Do not unmount layout effe... — committed to facebook/react-native by sammy-SC 2 years ago
- React Native sync for revisions 54f297a...ab075a2 Summary: This sync includes the following changes: - **[ab075a232](https://github.com/facebook/react/commit/ab075a232 )**: Do not unmount layout effe... — committed to OlimpiaZurek/react-native by sammy-SC 2 years ago
I think ( assumption ) I found out what’s causing & how to solve it :
Its due to failing of ‘pod install’ command at the time of react-native init because of the unavailability of Cocoa Pods
Solution :
Fixes the issue for sure.
@andercard , can you check this: build -> edit scheme -> go to build tab and check whether target react is available? Even I am having same issue but for me target is showing as react (missing).
@satishnvrn there it no React.xcodeproj for RN61
pod install in ios dir after react native init did not work for me. Target React still Missing.
I also had the same issue. Created a new project and got the error ‘RCTBridgeDelegate.h file not found’ when executing react-native run-ios.
I solved it by installing pod.
Now I come from android background. So I have very little idea about pod. And no idea about CocoaPods.
I run following commands in terminal:
(I have also changed the project settings to Legacy Build in Xcode)
And it’s DONE
I got the same error. First, I added React.xcodeproj into libraries in ios folder and then added it in schema. You can find React.xcodeproj in node_modules/react-native/React/React.xcodeproj. It fixed the issue.
@Kida007 pod install resolved that issue but now have got one more issue
In file included from /…/node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.m:8:
/…/node_modules/react-native/Libraries/PushNotificationIOS/RCTPushNotificationManager.h:8:9: fatal error: ‘React/RCTEventEmitter.h’ file not found
#import <React/RCTEventEmitter.h> ^~~~~~~~~~~~~~~~~~~~~~~~~
any one facing issue with PushNotificationIOS?
delete ios/build floder and bulid again
I am still struggling with these problems. lang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried these steps: cd ios pod install cd … react-native run-ios
Then I choose the Legacy Build system in Project Settings. I tried to run it, and it did not worked.
After these, i opened xcode and looked manage schemes. React(missing)… I deleted React and click add again but there is no React option.
@PavanKumar-sa Yes, but I have the same problem
Please try this. It’s work for me in error which I am getting in installing pods. sudo xcode-select -switch <path/to/>Xcode.app
Create a project from scratch to test and present the same error
I have the same error , Then I use Xcode,click the run button ,according to the error prompted by xcode and modified(I deleted RCTGeolocation). It is ok.
What work for me: I was opening my project with xcodeproj now i open it with xcworkspace
and works
i’m also facing the same issue
I am still struggling with these problems. lang: error: linker command failed with exit code 1 (use -v to see invocation)
I tried these steps: cd ios pod install cd … react-native run-ios
Then I choose the Legacy Build system in Project Settings. I tried to run it, and it did not worked.
After these, i opened xcode and looked manage schemes. React(missing)… I deleted React and click add again but there is no React option.
Perhaps for some people a no-brainer -) But after the pod install I had to open the workspace instead of the project. Which is also recommended by the react native team. The build target React was still missing. Removed the React (Missing) target and added the React target from the podfile instead. After that I was able to run a build. Hope it helps.
I am facing the above issue. Any solution?
@eggybot any solution here? I met the same issue.
I tried everything, this was the only thing that worked. I’ll add that I went back to manage schemes, selected React, (it was available again), then did
All ended up working out.
same issue React is missing in the scheme. Also, this error show up
'React/RCTLog.h' file not found
for the projectappTests.mI got the same error after I use the
react-native init
to create a new project.Then I found that the
react-native init
have some error message telling me that my Node version is too slow.I updated Node version then try
react-native init
again.This time, it asks me:
? CocoaPods (https://cocoapods.org/) is not installed. It's necessary for iOS project to run correctly. Do you want to install it? ...
So I think maybe the Node version is the root cause, it blocked the upgrade and init, so that you couldn’t install the CocoaPods completely, and it makes you see the error on
<React/RCTBridgeDelegate.h>
.