diff --git a/README.md b/README.md index d484b2fa..6eb7d5b0 100644 --- a/README.md +++ b/README.md @@ -388,6 +388,8 @@ See [CONTRIBUTING](https://github.com/doronz88/pymobiledevice3/blob/master/CONTR Please see [misc](https://github.com/doronz88/pymobiledevice3/blob/master/misc) +Library uses WindowsSelectorEventLoopPolicy for asyncio on Windows platform. Please see discussion [misc](https://github.com/doronz88/pymobiledevice3/issues/1217) + ## Copyright notice This work is licensed under GPL 3.0, and as, credited to several major contributors: diff --git a/pymobiledevice3/__main__.py b/pymobiledevice3/__main__.py index c8fa63bc..4468f574 100644 --- a/pymobiledevice3/__main__.py +++ b/pymobiledevice3/__main__.py @@ -1,3 +1,4 @@ +import asyncio import difflib import logging import os @@ -33,6 +34,10 @@ logger = logging.getLogger(__name__) +# For issue https://github.com/doronz88/pymobiledevice3/issues/1217, details: https://bugs.python.org/issue37373 +if sys.platform == 'win32': + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) + INVALID_SERVICE_MESSAGE = """Failed to start service. Possible reasons are: - If you were trying to access a developer service (developer subcommand): - If your device iOS version >= 15.0: