iOS 9 click on uiactionsheet/uiactioncontroller button using Appium Java

I am trying to automate Native app using Appium on iOS 9.2.1. I want to install a profile but I am not able to click on ‘Install’ pop up (uiactionsheet or uiactioncontroller element) using Appium.

Appium Version : 1.4.13

Language : Java

Phone : iOS9.2.1
Does anyone know the solution for it? Thanks in advance.

uiactionsheet or uiactioncontroller element Are these, not present in the Appium Inspector hierarchy ?

Appium Inspector fails to load the elements. Therefore, it keeps executing for a while and it throws ‘undefined’ string.

i.e. the screen appears in the in built settings app. I am able to click on install button using precise tap after launching it through a helper app(custom app created to launch in build settings app). Elements of uiactioncontroller/uiactionsheet (Install pop up displayed in the screen) do not appear in hierarchy

Appium can not instrument builtin apps, because they aren’t in debug mode. You can not automate any iOS application if it’s not in debug mode.

I found a workaround to launch the Setting application.

Regarding workaround:
The way safarilauncher code uses URL to launch safari app, I used the following code to launch Setting app. I created one custom app and included the following code to launch Setting in build app.

NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
[[UIApplication sharedApplication] openURL:url];

Using the workaround, I could launch the Setting app and automate the app using precise tap. I get all the ids,names and xpaths of Setting app but am unable to perform click or tap action. However, I could use precise tap to perform actions.

Example : I could perform following actions

  1. Tap on General
  2. Scroll down to Profiles
  3. Tap on Profiles & Device Management
  4. Tap on Profile XYZ

When Install pop up (as per the screenshot) is activated, I didn’t find any way to locate the element. Therefore, I am unable to perform click,tap or precise tap action.

After reading the logs from Appium console, precise tap gets performed on the location(provided in the method) which is below this pop up. Can you please guide me on this?