question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Xcode 14] `run-ios` fails on fresh new project

See original GitHub issue

Description

I am running the command npx react-native init AwesomeProject everything works great but then when I am trying to run on iOS I have the following issue

> AwesomeProject@0.0.1 ios
> react-native run-ios

info Found Xcode workspace "AwesomeProject.xcworkspace"
info Building (using "xcodebuild -workspace AwesomeProject.xcworkspace -configuration Debug -scheme AwesomeProject -destination id=2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0")
    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')
    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')
▸ Running script 'Start Packager'
▸ Running script 'Bundle React Native code and images'
▸ Build Succeeded
success Successfully built the app
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:iOS Simulator, id:2CC92D0D-3623-4E4F-A10B-FFAEDB6E83D0, OS:16.0, name:iPhone 13 }
{ platform:iOS Simulator, id:86F63448-3950-403E-B8C9-13491755B411, OS:16.0, name:iPhone 14 }
{ platform:iOS Simulator, id:1557EEB0-0B11-4AB5-A2B9-02606131CAFD, OS:16.0, name:iPhone 14 Plus }
{ platform:iOS Simulator, id:A1A74626-406E-4AC3-80F9-177FC8202DFC, OS:16.0, name:iPhone 14 Pro }
{ platform:iOS Simulator, id:F4EEA4A6-B478-4363-9759-39EE03F99EF7, OS:16.0, name:iPhone 14 Pro Max }
{ platform:iOS Simulator, id:A09D9B20-D89F-48A8-9CEE-35015EFD7EB7, OS:16.0, name:iPhone SE (3rd generation) }
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:B7DA7216-1933-439B-BB99-278A54FC9DDD, OS:16.0, name:iPad (9th generation) }
{ platform:iOS Simulator, id:670E1BA5-602E-4A84-9085-3E565E408F86, OS:16.0, name:iPad Air (5th generation) }
{ platform:iOS Simulator, id:BA5B5DB6-0540-4C36-954C-0720BF6D4EBD, OS:16.0, name:iPad Pro (11-inch) (3rd generation) }
{ platform:iOS Simulator, id:64B99D5A-8BA9-4E6C-80C5-C3417224F77E, OS:16.0, name:iPad Pro (12.9-inch) (5th generation) }
{ platform:iOS Simulator, id:F4FBD7CF-7C24-4A36-983D-9A37950AE750, OS:16.0, name:iPad mini (6th generation) }
2022-09-13 21:22:59.018 xcodebuild[19576:139674] Requested but did not find extension point with identifier Xcode.InterfaceBuilderBuildSupport.PlatformDefinition
info Installing "/Users/ajouve/Library/Developer/Xcode/DerivedData/AwesomeProject-cmodobjdhkgyybcihqmhuyqzsuzx/Build/Products/Debug-iphonesimulator/AwesomeProject.app"
info Launching "org.reactjs.native.example.AwesomeProject"
error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=3):
The request to open "org.reactjs.native.example.AwesomeProject" failed.
The process did launch, but has since exited or crashed.

I Reset Content And Setting from the simulator, clean from Xcode menu Product, rm -rf ios/build, restart computer, try to create w new project, nothing works

From time to time I have an other error

error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "org.reactjs.native.example.AwesomeProject" failed.
The request was denied by service delegate (SBMainWorkspace).
Underlying error (domain=FBProcessExit, code=128):
	The operation couldn’t be completed. The process exited.
	The process exited.

Tried on iPhone 13 and iPhone 14 simulator with both iOS 16.0

running npm run android I have no issues

Version

0.70.0

Output of npx react-native info

System: OS: macOS 12.6 CPU: (12) x64 Intel® Core™ i9-8950HK CPU @ 2.90GHz Memory: 225.53 MB / 32.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.14.0 - ~/.nvm/versions/node/v16.14.0/bin/node Yarn: 1.22.15 - ~/.nvm/versions/node/v16.14.0/bin/yarn npm: 8.3.1 - ~/.nvm/versions/node/v16.14.0/bin/npm Watchman: 2022.03.21.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: 2021.2 AI-212.5712.43.2112.8815526 Xcode: 14.0/14A309 - /usr/bin/xcodebuild Languages: Java: 14.0.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.1.0 => 18.1.0 react-native: 0.70.0 => 0.70.0 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps to reproduce

npx react-native init AwesomeProject
cd AwesomeProject
npm run ios

Same issue with npx react-native run-ios

Snack, code example, screenshot, or link to a repository

Defaut code

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
ajouvecommented, Sep 14, 2022

Thanks @kelset

I updated ruby to 2.7.5

Then ran

bundle install
bundle exec pod install

And it worked

2reactions
kelsetcommented, Sep 14, 2022

@ajouve can you check this comment https://github.com/facebook/react-native/issues/34608#issuecomment-1246730507 - it seems that for most people this is related to an Ruby version issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

XCode 14 compile errors immediatel… - Apple Developer
I'm unable to use XCode 14 to develop my app because as soon as a compiler error is shown, it is immediately withdrawn...
Read more >
Oh dear! Build errors? - LoopDocs - GitHub Pages
Open your project in Xcode as normal. Then go to the menu bar at the top of the screen and find the "Product"...
Read more >
npx react-native run-ios not working for react native fresh project
Since I am using a M1 based mac book when I ran pod install normally it did not work but when I ran...
Read more >
Code signing issues in Xcode 14 and how to fix them
Verify that the code signing settings in Xcode are correct at the target level (which override any values at the project level). If...
Read more >
iOS Troubleshooting Guide | Capacitor Documentation
Cleaning and rebuilding can fix a number of build issues. Navigate to Product -> Clean Build Folder in the Xcode menu to clean...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found