Real iOS device is not recognized. What is UUID, UDID, provisioning, and device name?

Hi all,

I am stuck now on setting up appium with real iOS device.

  1. My environment is:
  • Mac book (OS X El Capitan 10.11.6)
  • Xcode 7.3.1
  • appium 1.5.3
  • iPad 2 iOS 9.3.2
  1. appium with iOS simulator works well so that I think basic setup around my test script, appium server and xcode looks fine.
  2. Now, I’m trying to setup real iPad 2 according to “MOBILE SAFARI ON A REAL IOS DEVICE” chapter in http://appium.io/slate/en/master/?ruby#mobile-safari-on-a-real-ios-device , but no luck. the iPad2 real device is not recognized.

The document says:

To create a profile for the launcher go into the Apple Developers Member Center and:

Step 5: Download the profile and open it with a text editor.

Now, I have some questions.

Q1. I wonder where the profile is used? I thought somewhere the profile is installed, but there is no step to do that in this document. If the profile is not used, why is generation step required?

Q2. Step6 says UUID in the profile is my identity code. I see the uuid in the profile which I created as the following format:

...
<key>UUID</key>
<string>f######-####-####-####-##########05</string>
...

However, where the UUID is used? The document continues as “Now simply include your UDID”. I am confused here. UDID is not UUID, right? UDID here is Device Identifier of the iPad 2. Am I correct?

Q3. The document continues:

Now simply include your UDID and device name in your desired capabilities:
{
  "udid": '...',
  "deviceName": '...',
  "browserName": "Safari"
}

Where the deviceName above come from? It is Name of Device Information in Xcode > Window > Devices > My real iPad2 name, right? If yes, it can be renamed to any name other than “iPad 2” like “HelloWorld” at iPad 2 setting, right?

I run ios_webkit_debug_proxy with iPad2 UDID (not UUID created above) as follows:

$ ios_webkit_debug_proxy -c 9###########################d:27753

and run appium, but my iPad2 is not recognized so that the following error is displayed:

[iOS] Error: Could not find a device to launch. You requested ‘HelloWorld (9.3)’, but the available devices were: [“Apple TV 1080p (9.2) [] (Simulator)","iPad 2 (9.3) [] (Simulator)”,…]
at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)

Could you tell me how to setup real iOS device on appium?

Thank you and Best Regards,

When I run appium with -U [iPad2UUID] option, error is now different as follows:

[debug] [iOS] Couldn't find ideviceinstaller, trying built-in at /Users/[MyName]/[ProjectDir]/node_modules/appium/node_modules/build/libimobiledevice-macosx/ideviceinstaller
[iOS] Could not initialize ideviceinstaller; make sure it is installed and works on your system
[iOS] Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system
    at IosDriver.getIDeviceObj (lib/driver.js:380:15)
    at IosDriver.get (lib/driver.js:950:49)
    at IosDriver.configureApp$ (lib/driver.js:228:26)
    at tryCatch      
...
[Error: Could not initialize ideviceinstaller; make sure it is installed and works on your system]
[iOS] Bad app: '/Users/[MyName]/[ProjectDir]/node_modules/appium/node_modules/appium-ios-driver/build/SafariLauncher/SafariLauncher.app'. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name.

Is -U option different from nodeconfig capabilities.udid ? Anyway, I have no idea…

Thank you and Best regards,

To get tests running on my iOS devices, I needed to do a couple things:

  • First I installed node.js using homebrew: brew install node.
  • Then I installed authorize-ios: I used npm to install it by running npm install -g authorize-ios from the terminal. Once installed, I ran sudo authorize-ios.
  • Once that was done, I installed iDeviceInstaller using brew install ideviceinstaller.
  • Finally I installed the ios-webkit-debug-proxy using brew install ios-webkit-debug-proxy.

To run my tests I bring up my appium server and run ios-webkit-debug-proxy from a separate terminal window using a command like: ios_webkit_debug_proxy -d -c insertUdidHere:27753 If this connects you should see the terminal window populates with info as actions are performed in Safari (either manually or via appium).

If you want to run tests in Safari, you will need to use the Safari Launcher app. Note you will need to rebuild this app using an apple development certificate that contains your tests devices. This rebuilt app needs to have a bundle ID of com.bytearc.SafariLauncher. This need to be put in the **node_modules > appium-ios_driver > build > SafariLauncher ** folder of your appium installation.

Thank you very much for your info! Now I have found that similar discussion at https://github.com/appium/appium/issues/6637 I’ll see that also. Let me continue to work on this…

Thank you Cauthon and dhruv_91 at {IOS}Appium1.5 wrong BUNDLEID safari launcher post!

Now I am able to run real iPad with appium under selenium grid!!

Rebuilding SafariLauncher was the key step for me. Now I understand why provisioning profile creation is required, which is necessary to rebuild & install SafariLauncher at iPad.

The original document http://appium.io/slate/en/master/?ruby#mobile-safari-on-a-real-ios-device is too short to understand…

Anyway, thank you very much for all of you and best regards,