forked from doronz88/pymobiledevice3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request doronz88#780 from codeskyblue/feature_xcuitest_squash
add feature XCUITest
- Loading branch information
Showing
7 changed files
with
470 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from packaging.version import Version | ||
|
||
from pymobiledevice3.lockdown_service_provider import LockdownServiceProvider | ||
from pymobiledevice3.remote.remote_service_discovery import RemoteServiceDiscoveryService | ||
from pymobiledevice3.services.remote_server import RemoteServer | ||
|
||
|
||
class DvtTestmanagedProxyService(RemoteServer): | ||
SERVICE_NAME = 'com.apple.testmanagerd.lockdown.secure' | ||
OLD_SERVICE_NAME = 'com.apple.testmanagerd.lockdown' | ||
RSD_SERVICE_NAME = 'com.apple.dt.testmanagerd.remote' | ||
|
||
# TODO: there is also service named 'com.apple.dt.testmanagerd.remote.automation', but not used | ||
|
||
def __init__(self, lockdown: LockdownServiceProvider): | ||
if isinstance(lockdown, RemoteServiceDiscoveryService): # only happends when >=17.0 | ||
service_name = self.RSD_SERVICE_NAME | ||
elif Version(lockdown.product_version) >= Version('14.0'): | ||
service_name = self.SERVICE_NAME | ||
else: | ||
service_name = self.OLD_SERVICE_NAME | ||
|
||
super().__init__(lockdown, service_name, remove_ssl_context=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.