Xcode Build Failure: “React Native Build Issues on iOS. Xcode Error Code 65 and AppDelegate.m Selector Error”


Context:

USING MERN STACK.

I have a React Native project that was initiated in 2021. It used to run without issues using npm install, npx pod-install, and npm run ios. However, since May 2023, I’ve encountered multiple errors and dependency problems, potentially due to Xcode or macOS updates.

After updating the project’s dependencies to resolve the initial errors, I am now stuck with a final build error that I can’t seem to resolve. Running the project through Xcode (opening MYVU.xcworkspace) yields a different error. Below are the details of the errors I’m currently facing.

Errors:

1. Terminal Error on npm run ios:
At the start, I receive the usual build process logs, but it ends with:

“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 MYVU.xcworkspace.

The specific build command failure is:
“The following build commands failed:
CompileC /Users/bolt/Library/Developer/Xcode/DerivedData/MYVU-azqcqluibbqvqnguxonkqyoewstd/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/SysUio.o /Users/bolt/Desktop/myvu-mobile-main/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target ‘RCT-Folly’ from project ‘Pods’)
(1 failure)”
The specific build command failure is:

2. Xcode Error in AppDelegate.m:
When running the project directly from Xcode (MYVU.xcworkspace), I encounter this error in AppDelegate.m:

“No visible @interface for ‘RCTBundleURLProvider’ declares the selector ‘jsBundleURLForBundleRoot:fallbackResource:'”

Environment:

React Native Version: 18.2.0
Xcode Version: 15.0.1
macOS Version: Sonoma 14.1.1
Node Version: v21.1.0

Attempts to Resolve:

Updated project dependencies to latest versions.
Cleaned build folder and deleted derived data in Xcode.
Tried resetting iOS simulators.
Searched for similar issues but couldn’t find a solution that fits.

Expected:

The Simulator should open and build the app.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img