How to add an iphone to use with xcode
Références:
https://stackoverflow.com/questions/67279997/connect-iphone-via-usb-to-sosumi-qemu
https://github.com/sickcodes/Docker-OSX/issues/133
Define usb port to be usb passthrough
it is easier to select a usb bus where your iphone is single but in case you can't follow the udev rules
plug your iphone to usb
$ lsusb
Bus 001 Device 004: ID 05ac:12a8 Apple, Inc. iPhone 5/5C/5S/6/SE
Since qemu runs as a regular user, it cannot connect to hot-plug USB devices unless you change permssions on the host. Being in group plugdev might be sufficient for standard USD block devices. For others, such as an iphone, you need to manually change the /dev/bus/usb/xxx/yyy to group users or create /etc/udev/rules.d/97-iphone.rules.
https://www.linuxquestions.org/questions/blog/kingbeowulf-74138/qemu-usb-passthrough-with-specifics-for-iphone-37830/
sudo vim /etc/udev/rules.d/97-iphone.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="*",GROUP="users", MODE="0660"
0x05ac vendor ID in this case is for an Apple iPhone 5C. For iphones specifically, it can help to disable usbmuxd with an empty /etc/udev/rules.d/39-usbmuxd.rules
Now, either reboot (ha! this ain't windows!) or run as root
sudo udevadm control -R
then edit yout lanch-mac-os.sh and add
-usb \
-device usb-ehci,id=ehci \
-device usb-host,bus=ehci.0,vendorid=0x05ac,productid=0x12a8,guest-reset=false,id=iphone \
Warning if you intend to code with xcode or upgrade your iphone with your mac , remove the productid . see comment below.
Pairing an iOS device with Xcode
- Open Xcode and go to Window > Devices and Simulators.
- Plug your iOS device into your Mac using a lightning cable. You may need to select to Trust This Computer on your device.
- Select your device and then select the Connect via network checkbox to pair your device:
https://stackoverflow.com/questions/10087985/xcode-doesnt-see-my-ios-device-but-itunes-does
Do I need to be a Apple Developer Member to deploy apps on my iphone ?
https://developer.apple.com/forums/thread/81424
when you launch your mac os x you should get this :
[email protected] ~ % lsusb
Bus 004 Device 002: ID 0627:0001 0627 QEMU USB Mouse Serial: 89126-0000:00:04.0-3
Bus 004 Device 003: ID 0627:0001 0627 QEMU USB Keyboard Serial: 68284-0000:00:04.0-2
Bus 004 Device 001: ID 05ac:12a8 Apple Inc. iPhone Serial: 650d4ab950e8ece4cd07b637044440618c9080b4
Bus 000 Device 001: ID 1d6b:IPCI Linux Foundation USB 2.0 Bus
Bus 000 Device 001: ID 1d6b:IPCI
IPCI
IPCI
IPCI Linux Foundation USB 2.0 Bus
documentation