Using real devices attached to Anka VMs for CI
If you run tests on real devices connected to your mac machines, then you can replicate the same setup on Anka Build macOS private CI cloud with USB features available in the enterprise tier.
Attach real devices to Anka Build node host mac machines through the USB interface.
Establish trust between the device and the host. To access iOS devices from the VM the device and VM have to be trusted.
The trust procedures are the same in the VM and host, but is the device is not physically detached from the USB port, connection to VM could be treated as a security attack, and the device won’t respond to VM’s requests. In this case, it’s recommended to not “trust” host on iOS devices before it's done for VM. If the host is already trusted before passing the iOS device to VM, it’s recommended to clear the pairing information by Settings->General->Reset->Reset Network Settings. For a more detailed explanation see this blog.
Claim the devices using
anka usb claimcommand. If you have multiple device types like iPhone7, iPhone8, Apple watch then claim each type across your Anka Build node host mac machines under the same name. For example, claim all iPhone7 devices under claim name “iPhonedevice” using theanka usb claim -nflag, Apple watch under “watchdevice”. Then, use this claim name along with VM start command to get access to a VM with the device attached.Use the controller REST API call
url= "/api/v1/usb"to get a list of all real devices/USB devices connected to the Anka Build cloud.Start VMs on-demand with a real device attached using command
anka start -dor start from the controller REST API usingurl= "/api/v1/vm"and pass the USB_device variable.
USB command reference
Please refer to USB commands page.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.