How to change port on RN 61 for IOS?
See original GitHub issueDescription
Ok, I know that, in the official docs it says I have to use the port
parameter.
But it also says that for IOS:
[…] update occurrences of 8081 to your chosen port in the node_modules/react-native/React/React.xcodeproj/project.pbxproj file
The problem is that here it says RN 60 removes “React.xcodeproj”.
My question is, then: What is the new way of changing ports, whitout React.xcodeproj?
I’m running bundler and react-native run-ios
with --port=9000
but, of course, I’m getting this error:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2): Failed to install the requested application An application bundle was not found at the provided path.
Because somewhere, port :8081 is still hardcoded.
And no I can’t just kill what’s on port 8081. This is a corporate computer that has McAffee running on 8081 and this process won’t shut down 😦
React Native version:
“react”: “16.9.0”, “react-native”: “0.61.2”
macOS Catalina 10.15.7 Xcode 11.5
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
react-native start --port=9000
react-native run-ios --port 9000
Expected Results
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2): Failed to install the requested application An application bundle was not found at the provided path. Provide a valid path to the desired application bundle. Print: Entry, ":CFBundleIdentifier", Does Not Exist error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier Print: Entry, ":CFBundleIdentifier", Does Not Exist
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top GitHub Comments
I have a temp fix (I’m not a Ruby dev so there’s probably a better way of doing this):
pod install
again@safaiyeh - This isn’t working for me on
react-native
0.64.0. via the--port=8082
flag specifically for the ios build.Looks like the issue for iOS stems from
RCTDefines.h
innode_modules/react-native/React/Base/RCTDefines.h
If I update the port here to
8082
then run the ios command, then things work properly on the custom port, but that kind of defeats the purpose of having the cli argument if we still need to manually edit files to get it to work.