skip to Main Content

I am trying to run a basic template React Native app on my IOS device or in my IOS Simulator but I get a very long text and the following errors:

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 AwesomeProject.xcworkspace.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace AwesomeProject.xcworkspace -configuration Debug -scheme AwesomeProject -destination id=00008020-000235011E30003A

warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AwesomeProject' from project 'AwesomeProject')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'AwesomeProject' from project 'AwesomeProject')

2023-04-02 20:56:35.729 xcodebuild[35890:143095] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
** BUILD FAILED **


The following build commands failed:
    CompileC /Users/nicolelopezfeliz/Library/Developer/Xcode/DerivedData/AwesomeProject-elruyvhqgfpifqffdidsgwslnoos/Build/Intermediates.noindex/Pods.build/Debug-iphoneos/React-Codegen.build/Objects-normal/arm64/FBReactNativeSpec-generated.o /Users/nicolelopezfeliz/Desktop/dev/AwesomeProject/ios/build/generated/ios/FBReactNativeSpec/FBReactNativeSpec-generated.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-Codegen' from project 'Pods')
(1 failure)

info Run CLI with --verbose flag for more details.

What I did:
I Started a template project with: $npx react-native@latest init AwesomeProject
I started the metro in another terminal, with: $npx react-native start
I tried to run the project with: $npx react-native run-ios
I tried to run the app in Xcode but I get the following error: enter image description here
I also tried to:

  • uninstall all other versions of node and just run on one
  • I tried: cd iOS && pod install

I am following this documentation to get React Native running on my devices/simulators. I get the same errors when I try to run it in the simulator.

I am currently on a MacBookk pro with M2 pro chip. I have installed rosetta as well.

2

Answers


  1. FBReactNativeSpec.h error after upgrading from 0.68.x to 0.69.0

    Changing the deployment version from 11 => 12.4 worked for me.

    Thread above has a step-by-step if you scroll down a bit.
    Hope it works out for you!

    Login or Signup to reply.
  2. If you’re using Expo you can fix this by using expo-build-properties and setting the deploymentTarget to anything greater then 12 in your app.json:

      "expo": {
         "plugins": [
            [
              "expo-build-properties",
                 {
                    "ios": {
                        "deploymentTarget": "13.0"
                    }
                 }
             ],
         ]
     }
    

    If your just using React Native you need to set the Minimum Deployments of React-Codegen Pod in xcode. You can do this like so:
    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search