Appium ( WDA ) setup on Real iOS Device lessons learnt & pain areas

Hi All,

Please find below info related to setting up Appium on real iOS device

iPhone 4S ( 9.3.5 ) + XCode 8.3.3 + Appium 1.6.6-beta.3

STEP 1 : ( App installation step )

  1. VVIMP Step, make sure you can install AUT on the physical device.
    If you could do this it means almost 80% work is done.
    Refer : http://codewithchris.com/deploy-your-app-on-an-iphone/

    1.1 In case you find lost, just ask your iOS developer who can help quickly to fix any weird problem/s.

  2. For this you will need source code of the app.

  3. Note that .app is for simulator and physical device needs .ipa ( you need to archive the project to create one )

STEP 2 : ( WDA installation step )

  1. There are multiple documents explaining this; I’m NOT sure why

    1.1 https://github.com/appium/appium/blob/master/docs/en/appium-setup/real-devices-ios.md

    1.2 https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md

  2. The documentation is confusing in many places ( I had spent 1.5 days to get whole setup working )

  3. Try below 3 steps one after the another as per the documentation

    3.1 Basic (automatic) configuration
    3.1.1. didn’t work for me, got error 65 in appium server log.

    3.2 Basic (manual) configuration
    3.2.1 This step is very confusing, screen shot points to WebDriverAgent project and not sure how it’s opened
    3.2.2 This did NOT help me to resolve issue
    3.2.3 Some screen shots are outdated, which adds to confusion + frustration

    3.3 Full manual configuration
    3.3.1 “…the provisioning profile can be manually associated with the project (keep in mind that this will
    have to be done each time the WebDriverAgent is updated, and is not recommended):…”
    BUT without this I couldn’t get it working
    3.3.2 This has got 3 main steps, do it very carefully to get the WDA setup working properly.
    3.3.3 command “…xcodebuild -project WebDriverAgent.xcodeproj…” helped me to verify that
    setup is success
    3.3.4 couldn’t get “…you can try accessing the WebDriverAgent server status…” step working but
    whole setup just worked fine. I got the error

        vikram-anna-pro:~ vikram-anna$ curl -X GET $JSON_HEADER $DEVICE_URL/status
        curl: (6) Could not resolve host: application
        curl: (6) Could not resolve host: accept
        curl: (6) Could not resolve host: application
        curl: (7) Failed to connect to 192.168.2.51 port 8100: Connection refused
    
  4. Issue filed
    https://github.com/appium/appium/issues/9035

  5. appium.txt

    [caps]
    automationName = “XCUITest”
    platformName = “iOS”
    platformVersion = “9.3”
    deviceName = “iPhone 4S”
    udid = “6930e9e68d8fe637f29a39768f1b846a12345678”
    app = “/Users/vikram-anna/WordPressSample/src/test/resources/apps/ios/SIP.ipa”
    xcodeSigningId = “12345678”
    xcodeSigningId = “iPhone Developer”

Here I was told WDA is not supported on iPhone 4S ( 32 bit architecture ) but I could able to run automation on the same

If you find some new tips/info please add to this thread.

@VikramVI correct :slight_smile:

xcodeSigningId = "12345678"
xcodeSigningId = “iPhone Developer”

also it is possible to use “xcodeConfigFile” to some ‘/Users/…/xxxxxx.xcconfig’ where config is:

    DEVELOPMENT_TEAM = <Team ID>
    CODE_SIGN_IDENTITY = iPhone Developer

source: https://github.com/appium/appium/blob/master/docs/en/appium-setup/real-devices-ios.md

You can configure appium for iOS even without paid apple developer account, refer to this video: https://www.youtube.com/watch?v=dyijACVRQOc , hope it helps :slight_smile: