Unable to detect iOS device in Katalon Studio

Hi All,

I am unable to see my physical device appearing on Katalon Studio.
Only simulators are showing up when I try to run or record for iOS devices in Katalon.

Some information of my setup :
Xcode 10.1
Appium 1.8.1
Katalon 6.1.0
MacOS High Sierra 10.13.6
Device - iPhone SE iOS 11.2.1

I have tried following the instructions in these documents :
https://docs.katalon.com/katalon-studio/docs/installing-webdriveragent-for-ios-devices.html
https://docs.katalon.com/katalon-studio/videos/ios_mobile_testing.html

Log from building the Webdriveragent :

SSOExPro02s-MacBook-Pro:WebDriverAgent taoadmin$ xcodebuild USE_PORT=8100 -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=97f23868347ef40bcbb409ea87f0ded127182f45’ test
Build settings from command line:
USE_PORT = 8100

Prepare build
note: Using legacy build system

=== BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET WebDriverAgentRunner OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===

Check dependencies

Testing started on ‘Jonathan’s iPhone’
2019-03-28 15:10:55.614 xcodebuild[751:10046] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/Users/taoadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/Test-WebDriverAgentRunner-2019.03.28_15-10-54-+0800.xcresult/1_Test/Diagnostics/WebDriverAgentRunner-6069D28E-12DD-43CD-828B-CD5A937AF134/WebDriverAgentRunner-7E28B85B-964E-4A10-A4C2-78EDC92A450F/Session-WebDriverAgentRunner-2019-03-28_151055-rGPFMY.log
2019-03-28 15:10:55.615 xcodebuild[751:9913] [MT] IDETestOperationsObserverDebug: (EFA1C4FE-9232-44EB-8F76-B82578C9D666) Beginning test session WebDriverAgentRunner-EFA1C4FE-9232-44EB-8F76-B82578C9D666 at 2019-03-28 15:10:55.615 with Xcode 10B61 on target :iphone:<DVTiOSDevice (0x7f952e6c8830), Jonathan’s iPhone, iPhone, 11.2.1 (15C153), 97f23868347ef40bcbb409ea87f0ded127182f45> {
deviceSerialNumber: F17RXGXDH2Y8
identifier: 97f23868347ef40bcbb409ea87f0ded127182f45
deviceClass: iPhone
deviceName: Jonathan’s iPhone
deviceIdentifier: 97f23868347ef40bcbb409ea87f0ded127182f45
productVersion: 11.2.1
buildVersion: 15C153
deviceSoftwareVersion: 11.2.1 (15C153)
deviceArchitecture: arm64
deviceTotalCapacity: 60626071552
deviceAvailableCapacity: 58711486464
deviceIsTransient: NO
ignored: NO
deviceIsBusy: NO
deviceIsPaired: YES
deviceIsActivated: YES
deviceActivationState: Activated
isPasscodeLocked: NO
deviceType: <DVTDeviceType:0x7f9530bc88c0 Xcode.DeviceType.iPhone>
supportedDeviceFamilies: (
1
)
applications: (null)
provisioningProfiles: (null)
hasInternalSupport: NO
isSupportedOS: YES
developerDiskMountError: (null)
(null)
bootArgs: (null)
connected: yes
isWirelessEnabled: no
connectionType: direct
hostname: (null)
bonjourServiceName: 4c:57:ca:17:9d:ec@fe80::4e57:caff:fe17:9dec._apple-mobdev2._tcp.local.
} (11.2.1 (15C153))
MDMCreateDeltaDirectory:1920 calling MDMDirectoryDiff with:
state->old_bundle: /var/folders/cw/hql9m3f97w98ftpn6_z6_2680000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/e2f100443e5102662d994a3f18d73334/97f23868347ef40bcbb409ea87f0ded127182f45/WebDriverAgentRunner-Runner.app
state->new_bundle: /Users/taoadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app
state->dst_bundle: /var/folders/cw/hql9m3f97w98ftpn6_z6_2680000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.V3uZst/WebDriverAgentRunner-Runner.app_sparse.ipa/Payload//WebDriverAgentRunner-Runner.app, binaryDiff flag: FALSE
dst_ipa: /var/folders/cw/hql9m3f97w98ftpn6_z6_2680000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.V3uZst/WebDriverAgentRunner-Runner.app_sparse.ipa
MDMDirectoryDiff_block_invoke:1473 calling writeDictToFile with: /var/folders/cw/hql9m3f97w98ftpn6_z6_2680000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.V3uZst/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
writeDictToFile:1278 ==== Successfully wrote Manifest cache to /var/folders/cw/hql9m3f97w98ftpn6_z6_2680000gp/C/com.apple.DeveloperTools/All/Xcode/EmbeddedAppDeltas/WebDriverAgentRunner-Runner.app.V3uZst/WebDriverAgentRunner-Runner.app_sparse.ipa/ManifestCache.plist
2019-03-28 15:11:00.899773+0800 WebDriverAgentRunner-Runner[257:8033] +[CATransaction synchronize] called within transaction
2019-03-28 15:11:00.941726+0800 WebDriverAgentRunner-Runner[257:8033] Running tests…
2019-03-28 15:11:01.590995+0800 WebDriverAgentRunner-Runner[257:8033] Continuing to run tests in the background with task ID 1
Test Suite ‘All tests’ started at 2019-03-28 15:11:02.264
Test Suite ‘WebDriverAgentRunner.xctest’ started at 2019-03-28 15:11:02.267
Test Suite ‘UITestingUITests’ started at 2019-03-28 15:11:02.268
Test Case ‘-[UITestingUITests testRunner]’ started.
t = 0.00s Start Test at 2019-03-28 15:11:02.272
t = 0.01s Set Up
2019-03-28 15:11:02.288379+0800 WebDriverAgentRunner-Runner[257:8033] Built at Mar 28 2019 14:46:35
2019-03-28 15:11:02.328773+0800 WebDriverAgentRunner-Runner[257:8033] ServerURLHere->http://192.168.43.35:8100<-ServerURLHere

The last optional step from the document returns the following output :

ExPro02s-MBP:WebDriverAgent taoadmin$ curl -X GET $JSON_HEADER $DEVICE_URL/status
curl: (6) Could not resolve host: application
curl: (3) Port number ended with ‘a’
{
“value” : {
“state” : “success”,
“os” : {
“name” : “iOS”,
“version” : “11.2.1”,
“sdkVersion” : “12.0”
},
“ios” : {
“simulatorVersion” : “11.2.1”,
“ip” : “192.168.43.35”
},
“build” : {
“time” : “Mar 28 2019 14:46:40”
}
},
“sessionId” : “C6F99204-70F2-4270-93E8-54B50B20CD2C”,
“status” : 0
}

Running device_id -l returns me with the UDID of my device:

SSOExPro02s-MBP:WebDriverAgent taoadmin$ cd /Applications/Katalon\ Studio.app/Contents/Eclipse/configuration/resources/tools/imobiledevice

SSOExPro02s-MBP:imobiledevice taoadmin$ idevice_id -l

97f23868347ef40bcbb409ea87f0ded127182f45

I have also tried to run the following code but it did not work :

brew uninstall ideviceinstallerbrew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew link --overwrite libimobiledevice
brew install --HEAD ideviceinstaller
brew link --overwrite ideviceinstaller
sudo chmod -R 777 /var/db/lockdown/

Will truly appreciate if anyone can help me with this problem, I’ve yet to be able to test any automation on iOS devices so far.

Thank you.

Hi @jonathan.loh,

The first thing I’d recommend if you’re using Xcode 10 is to upgrade Appium to 1.8.2-beta:

npm install -g appium@1.8.2-beta

It looks like you’ve done a lot of the troubleshooting tips normally recommended. There are a couple more here, including editing your settings file to hardcode your physical device id:

Hope this helps,

Chris