Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native CLI iOS build fails unless I specify UDID manually (error code 70)

On a brand new project generated with react-native init, this works as expected:

react-native run-ios --udid='4720C15A-8AED-45E5-B3CC-58461F5B4413'

But react-native run-ios without UDID param fails with:

warn Multiple Podfiles were found: ios/Podfile,vendor/bundle/ruby/2.7.0/gems/cocoapods-core-1.11.3/lib/cocoapods-core/Podfile. Choosing ios/Podfile automatically. If you would like to select a different one, you can configure it via "project.ios.sourceDir". You can learn more about it here: https://github.com/react-native-community/cli/blob/master/docs/configuration.md
info Found Xcode workspace "AwesomeProject.xcworkspace"
info Found [redacted]
info Building (using "xcodebuild -workspace AwesomeProject.xcworkspace -configuration Debug -scheme AwesomeProject -destination id=863BC019-F4A9-52FA-A489-94F23F2E4446")
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 70. 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=863BC019-F4A9-52FA-A489-94F23F2E4446

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES


2023-01-22 16:49:24.861 xcodebuild[29257:10638655] Writing error result bundle to /var/folders/hw/nxk409kd2r322j_4p504_fgr0000gn/T/ResultBundle_2023-22-01_16-49-0024.xcresult
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
                { id:863BC019-F4A9-52FA-A489-94F23F2E4446 }

        The requested device could not be found because no available devices matched the request.

        Available destinations for the "AwesomeProject" scheme:
                { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006000-001A51E022E2801E }
                { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
                { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
                { platform:iOS Simulator, id:F4A58EA2-A0F8-4BD7-8FDB-57C8E7D0822C, OS:16.2, name:iPad (10th generation) }
                { platform:iOS Simulator, id:08E35727-BE07-48D1-A2DE-ED1A1E69CA28, OS:16.2, name:iPad Air (5th generation) }
                { platform:iOS Simulator, id:91D05BF6-12E3-4806-BA14-6DF72CB2C5BD, OS:16.2, name:iPad Pro (11-inch) (4th generation) }
                { platform:iOS Simulator, id:B1D01D46-AEF7-4DC2-B4FE-92A10E0FE6D2, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }
                { platform:iOS Simulator, id:28E59780-E621-4457-A218-504CF2DF9539, OS:16.2, name:iPad mini (6th generation) }
                { platform:iOS Simulator, id:19AB219B-78B1-404B-B9F3-FB954C0C93CA, OS:16.2, name:iPhone 14 }
                { platform:iOS Simulator, id:55A453E2-B60F-4AB4-859C-0A8BF8572AB8, OS:16.2, name:iPhone 14 Plus }
                { platform:iOS Simulator, id:1F841D64-D675-4D11-9592-FFF7F4AD066E, OS:16.2, name:iPhone 14 Pro }
                { platform:iOS Simulator, id:4720C15A-8AED-45E5-B3CC-58461F5B4413, OS:16.2, name:iPhone 14 Pro Max }
                { platform:iOS Simulator, id:781F0720-AA38-412D-B358-DA58E7E7A99C, OS:16.2, name:iPhone SE (3rd generation) }

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

Building & running via Xcode UI also works. react-native start is running in a separate terminal.

Why is react native using that nonexistent destination ID by default, and how do I fix it?

  • react 18.2.0
  • react-native 0.71.1
  • react-native CLI 10.1.3
  • Xcode 14.2
  • macOS Ventura 13.1 on M1 Pro
like image 414
Dan Avatar asked Dec 05 '25 20:12

Dan


1 Answers

I encountered this on 0.71.2. It appears to be an open react-native bug since 0.71.1.

Link to issue on Github: https://github.com/facebook/react-native/issues/35917

like image 89
czhanacek Avatar answered Dec 08 '25 16:12

czhanacek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!