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

fix: terminateApp with devicectl for iOS 17 #1997

Merged
merged 11 commits into from
Sep 19, 2023
Merged

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Sep 17, 2023

Related to appium/appium#18749

This PR kills the process directly against iOS 17 devices via devicectl command without appium-ios-device side modifications.

driver.execute_script 'mobile:killApp', {bundleId: "com.apple.mobilesafari"}

terminateApp via XCTest (WDA) works without any issues, but instrument service gets an issue in iOS 17 with current appium-ios-device implementation. This could have small overhead than existing implementation (because of devicectl), but should not be a big issue for this usage


Note
Maybe we need to build a wrapper module for devicectl to use it widely for our use. This PR should refer to it later.

@KazuCocoa KazuCocoa changed the title fix: terminateApp with devicectl fix: terminateApp with devicectl for iOS 17 Sep 17, 2023
@@ -192,7 +193,7 @@ class IOSDeploy {
}
}

async terminateApp(bundleId) {
async terminateApp(bundleId, platformVersion) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say it makes sense to keep platformVersion as IOSDeploy property as it might be useful in other methods as well

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, that sounds good. let me do it as a follow-up pr (to pr split)

lib/ios-deploy.js Outdated Show resolved Hide resolved
lib/ios-deploy.js Outdated Show resolved Hide resolved
lib/ios-deploy.js Outdated Show resolved Hide resolved
lib/ios-deploy.js Outdated Show resolved Hide resolved
@KazuCocoa
Copy link
Member Author

updated ✅

@KazuCocoa KazuCocoa merged commit 16c7319 into master Sep 19, 2023
22 checks passed
@KazuCocoa KazuCocoa deleted the use-devicectl-appkill branch September 19, 2023 18:51
github-actions bot pushed a commit that referenced this pull request Sep 19, 2023
## [5.2.1](v5.2.0...v5.2.1) (2023-09-19)

### Bug Fixes

* terminateApp with devicectl for iOS 17 ([#1997](#1997)) ([16c7319](16c7319))
@github-actions
Copy link
Contributor

🎉 This PR is included in version 5.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants