iOS 12 USB pairing with Anka VM for iOS CI

In iOS 12 the lockdown procedure (mutual authentication of USB host and iOS device on each other) was modified. This lockdown procedure affects the workflow of attaching iOS devices to Anka VMs with USB pass-through for iOS CI real device testing using Anka Build or Anka Flow.



We have fixed this issue in Anka version 1.4.3 and also determined that a specific set of instructions are required to pair iOS 12 device with the Anka VM Template and then it can be used in a fully automated manner as part of CI.



Step 1 – If the device in the past, was already connected to host (on which the VM is going to run), then remove host record from the device DB, i.e., make the device forget the host. Execute the following to do this.

  • Detach the device from the host
  • On the device, Select Settings -> General -> Reset -> Reset Network Settings.
  • Step 2 – Attach the device to host and “Don’t Trust” the host in the dialog box that appears on the Device.




    If a dialog box also appears on the host, don’t ‘trust’ the device on the host.




    Step 3 – In the terminal window on the host, claim the device with these commands.


    sudo anka usb list

    sudo anka sub claim -n ios12iphone iphone/location

    “-n” flag can be used to associate a name with the claimed device. You can claim multiple devices connected to the same host with the same name, thus creating a group(name).






    Step 4 – Attach the device to the VM.


    anka start -d iPhone VMNAME


    The trust dialog will appear again on the device. Click on ‘trust’ the VM.





    and allow access to the device in the VM (trust device)





    Now the VM and the device are paired and accessible in Xcode and iTunes. You could detach the device, suspend or stop the VM. Next sessions of the VM or its clones on any other host should silently connect the device without additional prompts.




    Important – To pair another iOS12 device or other VMs, repeat steps 2 – 5, and make sure to “Don’t Trust” host on which you are performing the pairing. Contact us in our slack channel with additional questions on how to use the real devices with Anka Build dynamically provisioned VMs.

    Share this post

    networking-performancev1
    Unlocking Superior macOS VM Network Performance: Introducing Anka's new networking mode for Apple Silicon
    Large and complex enterprises using Anka have many different demands, and we have worked to continue to develop innovative technology to meet these demands. Enterprise infrastructure hardware is often on the cutting edge, and they need advanced capabilities...
    Read More
    gitlab-with-anka
    Anka Cloud Gitlab Executor
    Veertu’s Anka and the new Anka Cloud Gitlab Executor Veertu’s Anka is a suite of software tools built on the macOS virtualization platform. It enables the execution of single or multi-use macOS virtual machines (VMs) in a manner similar to Docker....
    Read More
    mac-scan-v1
    Real-Time CVE Scanning of your macOS Build Systems
    It’s common that an organization’s macOS build system will download thousands, sometimes tens of thousands of third-party dependencies every hour. When building and testing iOS applications, it typically downloads and installs third-party...
    Read More
    anka-on-silicon-v1
    The ONLY Fully Automated Apple Silicon macOS VM Creation Solution
    Starting in Anka 3.1 we announced that Anka is now able to fully automate the macOS installation processes, disabling SIP, and enabling VNC — all previously manual steps users had to perform inside o the VM. At the time of writing this article,...
    Read More
    anka_click
    Scripting macOS UI User Actions With Anka Click
    Starting in Anka 3.2, we’ve introduced a solution for scripting macOS UI user actions. You may ask, “Why would I want to do that?”. Well, often macOS configuration and applications do not have a CLI allowing you to perform certain actions...
    Read More
    mac-scan-fullscan-shells-v3
    Real-time, continuous scan of file downloads on macOS for security vulnerabilities
    Today, we are announcing the Beta availability of the Mac Scan solution. Mac Scan software runs on macOS systems (bare metal, virtual, EC2 Mac) and scans downloads in real time for security vulnerabilities. There are multiple scenarios why you would...
    Read More
    Screen Shot 2022-10-17 at 10.13
    Anka 3.1- Fully automated VM macOS installation & The Behavior-Driven macOS UI Automation Framework
    We are very happy to announce the General Availability of Anka 3.1 for Apple Silicon / ARM macs. In this release, we are taking our approach to iOS CI automation one step further by introducing a Behavior-Driven macOS UI Automation Framework in Anka,...
    Read More
    ankam1v2
    Migrating from Anka on Intel to Anka on M1 Mac for iOS CI
    In this blog, we will cover the key topics for migrating from Anka on Intel to Anka on M1/M2 Macs. Anka is an IaaC solution from Veertu to set up an agile Container like CI for iOS CI using macOS VMs. Anka for Intel uses Apple’s Hypervisor.Framework virtualization...
    Read More
    ami-scanner-featured-v2
    World's first Security Vulnerability scanner for EC2 Mac AMIs
    We are excited to announce the General Availability of the world’s first security vulnerability scanner for EC2 Mac AMIs. EC2 Mac AMI Scan scans Intel and Apple Silicon macOS EC2 AMIs, detects security vulnerabilities in third-party packages, dependencies,...
    Read More
    esxi-to-anka
    It's time to migrate your iOS CI from ESXi Virtual Mac Infrastructure to native macOS Virtualization
    When VMWare ESXi started officially supporting Apple macOS Virtualization on Mac hardware in late 2012, it opened the doors for the possibility of iOS development to move to a Linux-like, agile, scalable CI infrastructure. Soon enough, many iOS enterprise...
    Read More