Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add go-ios client #2471

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mykola-mokhnach
Copy link
Contributor

No description provided.

@KazuCocoa
Copy link
Member

KazuCocoa commented Sep 18, 2024

Tested with crash log:

[XCUITestDriver@8ca4] Selected GoIos real device client
[XCUITestDriver@8ca4] Executing /Users/kazu/.nvm/versions/node/v16.20.2/bin/ios crash ls --udid 00008020-000E5CDA0A23002E
[XCUITestDriver@8ca4] Event 'logCaptureStarted' logged at 1726635980476 (22:06:20 GMT-0700 (Pacific Daylight Time))
[XCUITestDriver@8ca4] Setting up real device

It looks good for me as an initial ios-go client merge.

In case a command requires RemoteXPC communication, probably go-ios would print error message but right now is fine.
Probably it would be nice to show this warning as log message...? Maybe not in this PR.

{"level":"warning","msg":"go-ios agent is not running. You might need to start it with 'ios tunnel start' for ios17+. Use ENABLE_GO_IOS_AGENT=yes for experimental daemon mode.","time":"2024-09-17T22:10:21-07:00"}

e.g.

kazu $ /Users/kazu/.nvm/versions/node/v16.20.2/bin/ios crash ls --udid 00008020-000E5CDA0A23002E
{"level":"warning","msg":"go-ios agent is not running. You might need to start it with 'ios tunnel start' for ios17+. Use ENABLE_GO_IOS_AGENT=yes for experimental daemon mode.","time":"2024-09-17T22:14:41-07:00"}
{"level":"warning","msg":"failed to get tunnel info","time":"2024-09-17T22:14:41-07:00","udid":"00008020-000E5CDA0A23002E"}
{"files":[".","..","SiriSearchFeedback-2024-09-17-220629.000.ips","SiriSearchFeedback-2024-09-17-221002.ips","BioLog","proactive_event_tracker-com_apple_Trial-com_apple_triald-2024-09-17-215719.ips","JetsamEvent-2024-09-17-215044.ips","TransparencyTopic-2024-09-17-215618.ips","DiagnosticLogs","KeySyncTopic-2024-09-17-215626.ips","KeySyncTopic-2024-09-17-215625.ips","DiagnosticRequest_com.apple.autobugcapture_Performance-2024-09-17-215103.ips","SiriSearchFeedback-2024-09-17-220629.ips","CloudServicesTopic-2024-09-17-215611.ips","DiagnosticRequest_com.apple.perfpowerservices.rapid_micro-diagnostic-2024-09-17-215849.ips","SWTransparencyTopic-2024-09-17-215559.ips","Retired","TransparencyTopic-2024-09-17-215617.ips","CloudServicesTopic-2024-09-17-215614.ips","NetworkingTopic-2024-09-17-215615.ips","NetworkingTopic-2024-09-17-215616.ips","ota_patch.txt","Assistant","ExcUserFault_VSAppIntents-2024-09-17-220136.ips"],"length":24}

This go-ios agent is not running... part I mean.

So, capture the stdout and parse initial a few lines at least in https://github.com/appium/appium-xcuitest-driver/pull/2471/files#diff-e25698387eb4a51626b4dfc0dda1bb802ecf83545e496b7094b706f5ad1a2083R110 and check the warning message.

We already done via xcrun device, but for example maybe

if (util.compareVersions(platformVersion, '>=', '17.0')) {
this.log.debug(`Calling devicectl to kill the process`);
const pids = (await this.devicectl.listProcesses())
.filter(({executable}) => executable.endsWith(`/${executableName}`))
.map(({processIdentifier}) => processIdentifier);
if (_.isEmpty(pids)) {
this.log.info(`The process of the bundle id '${bundleId}' was not running`);
return false;
}
await this.devicectl.sendSignalToProcess(pids[0], 2);
would require this via RemoteXPC method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants