expo-cli icon indicating copy to clipboard operation
expo-cli copied to clipboard

expo run:ios cannot install on physical device

Open 67millwood opened this issue 2 years ago • 14 comments

Summary

running expo run:ios. works great in simulators. cannot get an install on a physical device. same device has no issues being recognized as part of the project when using any EAS cli commands. have run through the eas credentials and see the UDID as well.

Environment

expo-env-info 1.0.2 environment info: System: OS: macOS 12.3.1 Shell: 5.8 - /bin/zsh Binaries: Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node Yarn: 3.2.0 - ~/.nvm/versions/node/v16.14.2/bin/yarn npm: 8.7.0 - ~/.nvm/versions/node/v16.14.2/bin/npm Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 IDEs: Xcode: 13.1/13A1030d - /usr/bin/xcodebuild npmPackages: babel-preset-expo: 9.0.2 => 9.0.2 expo: ^44.0.0 => 44.0.6 react: 17.0.1 => 17.0.1 react-dom: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-web: 0.17.1 => 0.17.1 npmGlobalPackages: eas-cli: 0.51.0 expo-cli: 5.3.2 Expo Workflow: managed

Please specify your device/emulator/simulator platform, model and version

iphone XR ios 15.4.1

Error output

Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the smrtrlifebeta editor. (in target 'smrtrlifebeta' from project 'smrtrlifebeta')

that warning is shown in the build process...the actual error is then: cannot find device

Reproducible demo or steps to reproduce from a blank project

expo run:ios --device <with UDID of device> output: cannot find device

expo run:ios --device <with no UDID> finding device spins...provides a list of simulators...never provides physical device as an option

67millwood avatar Apr 23 '22 11:04 67millwood

I'm having the same issue, I wanted to run on my physical device with the run:ios command but it doesn't recognize it. I ended up running from Xcode directly just make sure you have the dev client running

Stukz avatar May 26 '22 00:05 Stukz

It worked to me using the following command:

expo run:ios --device 'Fernando’s iPhone'

NandoMB avatar Jun 17 '22 13:06 NandoMB

It worked to me using the following command:

expo run:ios --device 'Fernando’s iPhone'

Be attempted to the " 's " on Fernando’s iPhone... You can use UUID too.

NandoMB avatar Jun 17 '22 13:06 NandoMB

I'm having this issue as well. My device is recognized by the mac finder, xcode, and the fb idb CLI (idb list-targets), however the expo-cli doesn't find it, and the cli that runs under the hood (xcrun xctrace list devices) also doesn't find my device that's plugged in.

Running expo run:ios -d <udid|device name> doesn't find it either.

Expo-cli: 5.5.1 Xcode & command line tools: 13.4.1 iOS version: 15.5 Phone plugged into an M1 Pro MBP via a usb-c to lightning cable.

I'm also having some build errors when trying to install on the device directly through xcode.

My next move is trying to debug the xcode errors and then updating to iOS 15.6 to see if that resolves things.

Ideally, it seems like we could figure out a way for the expo-cli to use the idb cli under the hood so that it can find my device and boot my app to it. It seems as though whatever idb is doing more closely matches what xcode and finder are doing. Which seems strange because I would think the xctrace command would be the exact same as what xcode is executing.

Let me know if any of you are experiencing the same issue. Thanks.

jakehasler avatar Jul 21 '22 20:07 jakehasler

image

Rebooted my device. Works now. Recognized by xctrace and the expo cli when I ran expo run:ios -d <device name>. Hopefully this helps someone else with the same issue.

jakehasler avatar Jul 21 '22 20:07 jakehasler

In my case it wasn't working because I needed to update XCode (the version I add wasn't able to compile for the latest iOS version)

MaxInMoon avatar Jul 22 '22 23:07 MaxInMoon

Hello I am having this problem but turning it off and on again did not solve...

react native version 0.68.2 expo 45 ios 15.6 (iPhone X) xCode 13.2.1

danvaneijck avatar Aug 04 '22 05:08 danvaneijck

As others, I would recommend running it directly with the device name, but might be helpful to have the device name as a single word without a space or other characters, so try changing it on your iPhone

expo run:ios --device Aron

AronBe avatar Aug 04 '22 06:08 AronBe

I have tried doing that with the devices UDID. It cannot be found. xcrun xctrace list devices also does not see the device

danvaneijck avatar Aug 04 '22 06:08 danvaneijck

What did work for me:

expo run:ios --device

It showed me a list of emulators including my connected device (my connected device had a plug icon before it's name). I selected it then had to install ios-deploy (brew install ios-deploy) because I was not being able to install my app in my real device without it. I tried expo run:ios --device again and it finally worked. After installing the build in my phone I just had to run expo start --dev-client. I also had to specify the URL manually inside the app that was created on my device because expo was not generating the QR code.

Oh, an importante thing: I was not able to test it on a real device until it was connected with an usb cable.

vitorguima avatar Aug 10 '22 12:08 vitorguima

Rebooted my device. Works now. Recognized by xctrace and the expo cli when I ran expo run:ios -d <device name>. Hopefully this helps someone else with the same issue.

All memes asides, this worked for me! I had an update to both Xcode and macOS available, so installing these and rebooting solved the issue. Device is now detected from expo run:ios --device

appfr3d avatar Aug 21 '22 19:08 appfr3d

Rebooted my device. Works now. Recognized by xctrace and the expo cli when I ran expo run:ios -d <device name>. Hopefully this helps someone else with the same issue.

After trying everything obviously this worked! :)

nembence avatar Aug 29 '22 13:08 nembence

just to let everyone know... faced the same issue, I tried different things: rebooted, renamed (removed spaces), but nothing was helped. After I unchecked the option "show this device if it is plugged into Wi-Fi" in the Finder, the build was successful from the first attempt.

more details: when I had run the command expo run:ios --device it had shown me 2 devices with the same name I had chosen the one with UDID, and then got device is busy error on the "planning build" stage, I assume that was because of the Wi-Fi flag.

raw error: { platform:iOS, id:00008110-0014###A2E###01E, name:iPhone, error:Device is busy (Preparing the watch for development via iPhone) }

Maks-Yaremenko avatar Sep 01 '22 01:09 Maks-Yaremenko

Hey guys, I'm getting the same error.

I'm trying to run the command expo run:ios --device with the physical device iPhone on windows but it doesn't work any workaround for this issue? How can I run this command on windows.

Shahzad6077 avatar Sep 08 '22 22:09 Shahzad6077

This appears to be resolved in the latest, versioned Expo CLI (npx expo run:ios -d). The device detection was written from scratch to ensure we could properly get devices regardless of how the device name was formatted. There are still some general macOS issues from time when certain versions of iOS cannot be discovered, but we physically cannot detect these devices at all. If you encounter this issue in the future, please open an issue on expo/expo.

EvanBacon avatar Oct 27 '22 22:10 EvanBacon