How to setup/config to run app on iOS real device

I am able to run on iOS Simulator
with the configuration:
appium.automationName = XCUITest
appium.platformName=IOS
appium.platformVersion = 13.6
appium.deviceName = iPhone 11 Pro
appium.app = /Users/laymui/Desktop/rn-first-app.app

However when I want to run the same app on the iOS real device iphone 6s
where my config is:
appium.automationName = XCUITest
appium.platformName=IOS
appium.platformVersion = 13.6.1
appium.deviceName = ‘iPhone 6s’
appium.app = /Users/laymui/Desktop/rn-first-app.app
appium.udid = a12510a8c8ec79876d8e10f38da17fb97dc720c3
serenity.extension.packages=capabilities

I run into this error:
[BaseDriver] loggingPrefs
[Appium] Appium v1.18.0 creating new XCUITestDriver (v3.25.0) session
[BaseDriver] The following capabilities were provided, but are not recognized by Appium:
[BaseDriver] hub
[BaseDriver] loggingPrefs
[BaseDriver] Session created with session id: 8ce0115c-1cc3-4ba3-91bd-c384089f9ae7
[XCUITest] Determining device to run tests on: udid: ‘a12510a8c8ec79876d8e10f38da17fb97dc720c3’, real device: true
[XCUITest] Normalized platformVersion capability value ‘13.6.1’ to ‘13.6’
[BaseDriver] Using local app ‘/Users/laymui/Desktop/rn-first-app.app’
[WebDriverAgent] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent’
[WebDriverAgent] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj’
[XCUITest] Setting up real device
[XCUITest] {}
[DevCon Factory] Releasing connections for a12510a8c8ec79876d8e10f38da17fb97dc720c3 device on any port number
[DevCon Factory] No cached connections have been found
[HTTP] <-- POST /wd/hub/session 500 1549 ms - 873

any idea what I have missed?

follow -> http://appium.io/docs/en/drivers/ios-xcuitest-real-devices/

i like " Full manual configuration" part and using it.

Make sure you use an app that has been compiled for real devices. The simulator app will not work on a real device (and vice versa).

the app is running on my iphone
I used expo to build and use the QR code to open on my iphone
Do I need to publish to apple store?

Do I need a paid apple developer account?

I got build failed
signing for ‘WebDriverAgentRunner’ require a development team

Yes. You need real paid dev certificate.

My ipa file was built using another real device
then I port over this ipa to my own iphone real device
will it work? becos I got the error as below,

I got [XCUITest] Setting up real device
[XCUITest] Error installing app: Unexpected data: {“Error”:“ApplicationVerificationFailed”,“ErrorDetail”:-1,“ErrorDescription”:“Failed to verify code signature of /private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.6GWljf/extracted/rnfirstapp.app : 0xe8008015 (A valid provisioning profile for this executable was not found.)”}
[XCUITest] Falling back to ‘ios-deploy’ usage

so in order for this to work, I should plugin my real device to the USB and select it at xcode to use the developer account to build the ipa and port to this ipa in my automation’s config file?

  1. you need build WDA with REAL dev certificate on your mac! -> check link above.
  2. you need on phone enable developer and choose TRUST your mac with first connect by cable
  3. you need ipa builded for GENERAL device. thus it should install on any iPhone.
1 Like