iOS 15 - UI Test keeps asking pin code for "Enable UI Automation"

We got the newly issue that our Test devices keeps us asking for the pin code to "Enable UI Automation".

Then it works for some hours or days, but after some time it starts again.

"Enable UI Automation" is already enabled in "Settings" - "Developer" menu.

The devices are located remotely and we can't access them directly, so this is a big issue for us right now.

Is there any way to avoid this?

Post not yet marked as solved Up vote post of perFromNil Down vote post of perFromNil
4.8k views
  • Can you elaborate a bit on your exact setup? AutomationMode should only ask for the device password if one is set. This is very unusual in situations where you don't have physical access to the device (e.g. CI).

  • Yes, we have the device password set. Setup is a MacMini with MacOS BigSur, Xcode 13 and two devices connected via USB. iPhone XS and iPhone 7, both iOS 15.1. It seems like the frequent asking for device code is new behaviour. I will check if we can remove the password.

  • We have a similar problem where we do not have physical access to the device, the device is located remotely in the cloud and the application that we are testing needs the passcode enabled on the device. This iOS 15 change of entering the passcode physically has completely blocked us with our testing. Is there any way to explicitly avoid/ give permission once? So that the OS does not ask for the passcode even if the passcode is enabled on the device? How do we make it work on CI?

Replies

Remote automation on IOS 15 is blocked because of this change.

Hi, 10 months yet, Is there a solution to this issue. We have cloud solution that requires a pin code so we connect physical devices to the agent. But That pin code prevent us to run tests on devices with iOS15+ ? anyone?

MacMini requires a password to connect the device remotely, it is deathlock situation... Can someone help with this

Hello!

The unlock prompt to start UI automation was added as an extra layer of security, to prevent potential attackers from accessing private user data on a device without their consent.

As commented above, one workaround for this workflow would be to remove the passcode on your device, which does open up its vulnerability from a security perspective, but also removes the need to enter the passcode roughly once per day.

There is no officially supported way to automate the entry of this passcode, as this would negate the benefits of this added security layer.

In summary:

  • If you want the added security of this passcode requirement before a UI test can begin, you need to input the passcode manually about once per day
  • If you do not need this layer of security, you can remove the passcode from your device, and allow it to be automated without any passcode entry
  • This doesn't makes sense at all. In order to set the automation you need the phone unlocked, so it does already ask for a pin to unlock the phone , an no further requirement fr this should be asked. There is workaround only if the phone is connected with USB directly to the server. Testing over the wifi is much more user like experience. @Apple , you need to fix this. What is the behavior in iOS16 is it same?

  • @apple: is there any chance to challenge this? All providers of mobile device farms (e.g. browserstack, perfecto, digital.ai) are struggling with this change. Devices holding a passcode cannot be remotely accessed unless we have some manual interventions from operators entering the passcode on all devices > iOS 15, every single day! this is cumbersome, inefficient and very, very frustrating.

  • When using wifi for connection instead of USB cable, the password cannot be canceled, and once canceled, you cannot use wifi to connect the device wirelessly; and our test scene cannot use the USB cable, it has been used by other physical The device is occupied, and only wifi can be used, and the total number of passwords is asked, which completely blocks the test. Can you advance to solve this problem,please?

Add a Comment

Glad to hear some answer, however

Removing the passcode is no valid workaround since we have apps that require the passcode to start.

Testability is completely ignored also with Apple, at least add the option to disable the Unlock prompt under the Developer Settings. Put a disclaimer that your device is at risk when activating Developer Options.

Would be much easier if you add this extra level of security as a setting in Developers tools or Developer mode of the device, but not when the test starts!

For all Devs: I have opened a feedback assistance bug for this , if you want this to be fixed, I encourage you to open similar issues, as Apple will need how many people and organisations this affects.

https://feedbackassistant.apple.com/feedback/11793497

Raised a feedback as well, won't be visible for you but still here the reference number:

https://feedbackassistant.apple.com/feedback/11983078

Thanks for the bug reports (FB11793497, FB11983078).

I don’t have anything concrete to share on this front, other than that these reports are being seen by the right people.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

There's a workaround that you can specify passcode require time of iOS device: go to settings/Face ID&Passcode/ Require Passcode. Here you set a time to active passcode