Expo won't build to simulator instead of physical device
Asked Answered
H

2

8

Expo for some reason has started giving me the following error when I try to build using "npx expo run:ios":

Your computer requires some additional setup before you can build onto physical iOS devices.
  Learn more
CommandError: No code signing certificates are available to use.

However, I have no intention of building for physical iOS devices, only for simulator. Googling this error, all the solutions talk about getting this to run on. a physical device, but this is not what I want - I want to go back to using a simulator.

I've been trying to deal with this issue for the past day as it has never shown this message before in the past; tried deleting my ios folder and looked in config and xcode settings for anything which might be relevant, as well as settings or additional commands but it keeps thinking I wish to build to a physical iOS device.

Also working with a new node_modules and pods folder and yarn.lock file.

Please help!

Horst answered 11/9, 2023 at 10:22 Comment(0)
G
9

This happened to me and I just had to open up my workspace in Xcode (xed ios) and configure Team with my code signing identity under Signing & Capabilities https://github.com/expo/fyi/blob/main/setup-xcode-signing.md. It wasn't my app, so it showed some warnings like Cannot create a iOS App Development provisioning profile for ..., but I just ignored them and expo run:ios on the command line was happy

You might need to create a cert in Xcode first https://developer.apple.com/documentation/xcode/sharing-your-teams-signing-certificates#Create-a-new-code-signing-identity

Gannes answered 28/10, 2023 at 16:16 Comment(0)
G
4

In my case, adding usesAppleSignIn to app.json and running expo prebuild --clean added an entitlement to the Xcode project, which produced this error.

Here are the two entitlements listed that will trigger this. https://github.com/expo/expo/blob/main/packages/%40expo/cli/src/run/ios/codeSigning/simulatorCodeSigning.ts#L10

The issue was resolved when I removed usesAppleSignIn and then ran expo prebuild --clean again.

Gibeonite answered 12/9, 2023 at 2:42 Comment(1)
Unfortunately the error remains even after following these stepsHorst

© 2022 - 2024 — McMap. All rights reserved.