Search code examples
ios-ui-automationkifkif-framework

Why does running UIAutomation methods from KIF result in: "UIAutomation is not enabled on this device. UIAutomation must be enabled in Settings"?


Using: iOS 8.4, XCode 6.4, KIF 3.2.1 (https://github.com/kif-framework/KIF)

I encounter the following problem on a real device: While running a KIF test case, calling the method, "deactivateAppForDuration" results in the following output seen in the XCode console: "UIAutomation is not enabled on this device. UIAutomation must be enabled in Settings."

On the simulator, the app does indeed go to the background for the duration specified in the parameter of that method call.

  • I can confirm that the setting in device settings, "Developer > UIAutomation" is toggled on.
  • The build that I am compiling and running is a Debug build and is signed with my Developer Provisioning Profile (not a distribution profile).
  • All the possible compile configurations in the scheme are set to debug (profile for example)
  • I can record and playback UI interactions in the instruments developer tool (confirms that the app is built right and that the phone settings are correct)

Specific Code: [tester deactivateAppForDuration:5];

What could I be missing?


Solution

  • This is a known issue with UIAutomation on the device, see here.