expo / expo

An open-source framework for making universal native apps with React. Expo runs on Android, iOS, and the web.
https://docs.expo.dev
MIT License
33.74k stars 5.41k forks source link

expo run:ios --device not working on real device #32182

Open MariuzM opened 4 days ago

MariuzM commented 4 days ago

Minimal reproducible example

https://github.com/MariuzM/frameworks/tree/main/react-native-expo

What platform(s) does this occur on?

Android, iOS

Where did you reproduce the issue?

in a development build

Summary

When running bun expo run:ios --device and chose my device iPhone thats connected with cable i get this error

✔ Select a device › 🔌 MooMoo (18.0.1)
› Using --device 00008130
✔ Development team for signing the app › Marius - Apple Development: Marius Mariakinas 
› Signing and building iOS app with: Apple Development: Marius Mariakinas
› Planning build

› 0 error(s), and 0 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 70.
To view more error logs, try building the app with Xcode directly, by opening /Volumes/Media/Dev/Projects/test__frameworks/react-native-expo/ios/ExpoStarterApp.xcworkspace.

Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace /Volumes/Media/Dev/Projects/test__frameworks/react-native-expo/ios/ExpoStarterApp.xcworkspace -configuration Debug -scheme ExpoStarterApp -destination id=00008130 DEVELOPMENT_TEAM=XXXXX -allowProvisioningUpdates -allowProvisioningDeviceRegistration

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:
    DEVELOPMENT_TEAM = XXXXX

2024-10-20 10:53:15.465 xcodebuild[31748:148096] Writing error result bundle to /var/folders/nq/9t468y2j4bn2nmqfswkm0kcw0000gn/T/ResultBundle_2024-20-10_10-53-0015.xcresult
xcodebuild: error: Timed out waiting for all destinations matching the provided destination specifier to become available

        Ineligible destinations for the "ExpoStarterApp" scheme:
                { platform:iOS, arch:arm64, id:00008130, name:MooMoo, error:Device is busy (Waiting to reconnect to MooMoo) }
Build logs written to /Volumes/Media/Dev/Projects/test__frameworks/react-native-expo/.expo/xcodebuild.log
error: script "dev" exited with code 1

Environment

expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.7
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 20.17.0 - ~/dev/node-v20.17.0/bin/node
      npm: 10.8.2 - ~/dev/node-v20.17.0/bin/npm
    Managers:
      CocoaPods: 1.15.2 - /opt/homebrew/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
      Android SDK:
        Android NDK: 26.2.11394342
    IDEs:
      Xcode: 15.4/15F31d - /usr/bin/xcodebuild
    npmGlobalPackages:
      eas-cli: 12.5.4

Looks like doctor needs fixing also

Expo Doctor Diagnostics

➜ npx expo-doctor@latest
Need to install the following packages:
expo-doctor@1.11.2
Ok to proceed? (y) 

/Users/marius/.npm/_npx/89957a0324271eeb/node_modules/expo-doctor/build/index.js:91246
    throw new (_Errors().ConfigError)(`The expected package.json path: ${packageJsonPath} does not exist`, 'MODULE_NOT_FOUND');
          ^

ConfigError: The expected package.json path: /Volumes/Media/Dev/Projects/test__frameworks/package.json does not exist
    at getRootPackageJsonPath (/Users/marius/.npm/_npx/89957a0324271eeb/node_modules/expo-doctor/build/index.js:91246:11)
    at getPackageJsonAndPath (/Users/marius/.npm/_npx/89957a0324271eeb/node_modules/expo-doctor/build/index.js:90144:76)
    at getConfig (/Users/marius/.npm/_npx/89957a0324271eeb/node_modules/expo-doctor/build/index.js:90056:42)
    at actionAsync (/Users/marius/.npm/_npx/89957a0324271eeb/node_modules/expo-doctor/build/index.js:96736:50)
    at async run (/Users/marius/.npm/_npx/89957a0324271eeb/node_modules/expo-doctor/build/index.js:96821:5) {
  isConfigError: true,
  code: 'MODULE_NOT_FOUND',
  cause: undefined
}

Node.js v20.17.0
MariuzM commented 4 days ago

Looks like i needed to enable dev mode on my device, so I’ve done that now I'm getting

No profiles for 'com.mariuzm.expostarterapp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.mariuzm.expostarterapp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. 

How does one install profile on device? Sorry forgot this step