My bad, i have not selected the installed command line tools in Xcode. If anybody got this issue then make sure you also select the installed command line tools. Simply open Xcode, go to preference -> locations -> command line tools.
Answer from Usman Shahid on Stack OverflowMy bad, i have not selected the installed command line tools in Xcode. If anybody got this issue then make sure you also select the installed command line tools. Simply open Xcode, go to preference -> locations -> command line tools.
If you're having this issue, running the command below in the terminal will also fix it for you.
sudo xcode-select -s /Applications/Xcode.app
With the current Expo SDK 50, using npx expo prebuild is the right starting point. After you did this, you need to build your project without relying on the metro server. This means, you have to build a standalone .ipa file for ios. You can do all of the following in Xcode by opening your ios/*.xcworkspace file.
- Change the Build Configuration: In Xcode -> Product -> Scheme -> Edit Scheme -> choose "Debug" -> Close
- Build the app: Product -> Build
- Archive your app: if there are no building errors -> Product -> Archive
- Export archived app: Window -> Organiser (this should open up automatically after step 3) -> select the archived build -> Distribute App -> Debug -> Perform signing procedure -> Select destination for .ipa file
- Install app on connected device: Connect device to your Mac -> Window -> Devices and Simulators -> Under "Installed Apps", click on "+" -> Select .ipa file
If you want to run your Expo app on your physical device without using the Expo Go app and an Expo server, you would need to create a standalone app binary (an IPA file for iOS).
This process involves "ejecting" from the managed Expo workflow to gain more control over the build process. Here's the general process:
Run expo eject in your project directory. This will create native iOS and Android project directories and configuration files.
For iOS, you'll now have an ios folder in your project directory. You can open this in Xcode by navigating to the directory and opening the .xcworkspace file.
From Xcode, you can run your app on a connected device by selecting the device from the target device list and clicking the "play" button.
Please note: In order to install the app on a physical device, you'll still need an Apple Developer account, even if it's just the free version. You'll have to sign your app with a development certificate. The app will also only run as long as the development certificate is valid, which is typically 7 days for a free Apple Developer account. After this period, you'll need to re-sign and re-install the app.
If you're looking for a way to run your app on your physical device indefinitely without an Apple Developer account, unfortunately, this is not possible due to Apple's policies.
I had the same problem, fixed it by manually starting the simulator app before starting expo.
The app is located in /Applications/Xcode.app/Contents/Developper/Applications/Simulator.app
Manually opening the simulator first can help:
open -a Simulator
Then if using expo:
expo start
Finally click:
"Run on iOS simulator"
I have been running my project with Expo for over a year. This past week, while building locally on my dev machine instead of EAS with npx expo run:ios,I ran into an issue where Xcode required me to add iOS 18 to my XCode settings. From this point on, I am unable to run on my machine without XCode "crashing". The error logs are completely vague:
unexpected service error: The Xcode build system has crashed. Build again to continue.unexpected service error: The Xcode build system has crashed. Build again to continue.
I have tried the following:
updated my MacOS to V15
uninstalled & reinstalled XCode 16
If i send a build to EAS, it builds successfully. It looks like it's because the `latest` build image for IOS is:
Using VM template "macos-sonoma-14.5-xcode-15.4" running macOS Sonoma 14.5
My eas.json is
"build": {
"base": {
"ios": {
"image": "latest"
}
},The "latest" from EAS is behind??
So, does Expo not support Mac OS 15 + XCode 16?
What can I do so that my environments match?
When I build on EAS and use that image, I get some other weird message related to `require()` of an asset I have already been using, but that's another story.
EDIT: turns out this was all due to a package conflict with react-native-image-crop-picker
I had the same problem. Turns out using sudo when installing expo-cli is the issue. Run the following commands to resolve it.
npm uninstall -g expo-cli
npm install -g expo-cli
Then from your Mac's user's directory in a new terminal, run the following:
mkdir apps
cd apps
expo init app-name
Once this finishes, it should work just fine after running npm start.
As @Mercify said, sudo was indeed the problem.
For future reference: if installing expo without sudo throws an error, it is nessecary to change "the owner" of the folder "/usr/.../node_modules" to your user. This post helps changing the owner.
Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
Expo is now installing on the Simulator. Thanks to @Mercify.