In this guide, I will walk you through the steps to solve the confusing React Native error that occurs when trying to install React Native and run a project on iOS.
When I attempted to run the command “pod install” in the project’s ios
folder as instructed, I encountered a lengthy error message:
From this error, the key issue highlighted was “error: SDK ‘iphoneos’ cannot be located.” This seemed suspicious, prompting me to conduct further research. Fortunately, I found a solution that resolved the problem.
To fix this error, follow these steps:
- Open your terminal and run the following command:
sudo xcode-select --switch /Applications/Xcode.app
- Once the command has executed successfully, re-run the command “pod install.”
Once I completed these steps, the “iphoneos cannot be located” error was resolved, allowing me to proceed without any further issues:
By following these instructions, you can quickly resolve the “iphoneos cannot be located” error in macOS when working with React Native.