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
29.97k stars 4.71k forks source link

fix(cli): add `iPhone` as usbmux platform to os type #28802

Closed byCedric closed 2 weeks ago

byCedric commented 2 weeks ago

Why

Fixes #28781

How

In the logs of #28781, you can see the following debug logs. The last log line shows that this is missing.

  expo:apple-device:client:usbmuxd connectUsbmuxdSocket +0ms
  expo:apple-device:client:usbmuxd getDevices +1ms
  expo:apple-device:protocol:usbmux socket write: {"messageType":"ListDevices"} +0ms
  expo:apple-device:protocol:usbmux Response: {"DeviceList":[{"DeviceID":2,"MessageType":"Attached","Properties":{"ConnectionSpeed":480000000,"ConnectionType":"USB","DeviceID":2,"LocationID":*******,"ProductID":4776,"SerialNumber":"****************************************","UDID":"****************************************","USBSerialNumber":"****************************************"}}]} +23ms
  expo:apple-device:client:usbmuxd connectUsbmuxdSocket +23ms
  expo:apple-device:client:usbmuxd connect: 2 on port 62078 +0ms
  expo:apple-device:client:usbmuxd connect:device: {
  expo:apple-device:client:usbmuxd   DeviceID: 2,
  expo:apple-device:client:usbmuxd   MessageType: 'Attached',
  expo:apple-device:client:usbmuxd   Properties: {
  expo:apple-device:client:usbmuxd     ConnectionSpeed: 480000000,
  expo:apple-device:client:usbmuxd     ConnectionType: 'USB',
  expo:apple-device:client:usbmuxd     DeviceID: 2,
  expo:apple-device:client:usbmuxd     LocationID: *******,
  expo:apple-device:client:usbmuxd     ProductID: 4776,
  expo:apple-device:client:usbmuxd     SerialNumber: '****************************************',
  expo:apple-device:client:usbmuxd     UDID: '****************************************',
  expo:apple-device:client:usbmuxd     USBSerialNumber: '****************************************'
  expo:apple-device:client:usbmuxd   }
  expo:apple-device:client:usbmuxd } +0ms
  expo:apple-device:protocol:usbmux socket write: {"messageType":"Connect","extraFields":{"DeviceID":2,"PortNumber":32498}} +2ms
  expo:apple-device:protocol:usbmux Response: {"MessageType":"Result","Number":0} +2ms
  expo:apple-device:client:usbmuxd connect:device:response: { MessageType: 'Result', Number: 0 } +4ms
  expo:apple-device:client:lockdownd getAllValues +0ms
  expo:apple-device:protocol:lockdown socket write: {"Request":"GetValue"} +0ms
  expo:apple-device:protocol:lockdown Response: {"Request":"GetValue","Value":{"BasebandCertId":*********,"BasebandKeyHashInformation":{"AKeyStatus":*,"SKeyHash":{"type":"Buffer","data":[*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*,*]},"SKeyStatus":*},"BasebandSerialNumber":{"type":"Buffer","data":[*,*,*,*,*,*,*,*,*,*,*,*]},"BasebandVersion":"6.01.01","BoardId":*,"BuildVersion":"20H330","CPUArchitecture":"arm64","ChipID":*****,"DeviceClass":"iPhone","DeviceColor":"1","DeviceName":"iPhone","DieID":****************,"HardwareModel":"D211AP","HasSiDP":true,"HumanReadableProductVersionString":"16.7.7","PartitionType":"GUID_partition_scheme","ProductName":"iPhone OS","ProductType":"iPhone10,5","ProductVersion":"16.7.7","ProductionSOC":true,"ProtocolVersion":"2","SupportedDeviceFamilies":[1],"TelephonyCapability":true,"UniqueChipID":****************,"UniqueDeviceID":"****************************************","WiFiAddress":"**:**:**:**:**:**"}} +50ms
  expo:apple-device Unknown usbmuxd platform (needs to be added to Expo CLI): iPhone +0ms

Test Plan

See #28781

Checklist

pastelmind commented 1 week ago

Are we sure we added this to 0.18.11? I'm looking at https://unpkg.com/browse/@expo/cli@0.18.11/build/src/run/ios/appleDevice/AppleDevice.js#L123 and there is no check for "iPhone".

Edit: Looks like it was added to 0.18.12 (https://unpkg.com/browse/@expo/cli@0.18.12/build/src/run/ios/appleDevice/AppleDevice.js#L123), but the latest tag on npmjs.com is still at 0.18.11.