electricbubble / gidevice

communicate with iOS devices implemented with Golang
MIT License
274 stars 68 forks source link

watch service #8

Closed rohan-a99 closed 3 years ago

rohan-a99 commented 3 years ago

Can you add watch service also like it's implemented in tidevice?

electricbubble commented 3 years ago

Do you mean this?

dict(action=cmd_watch, command="watch", help="watch device")
def cmd_watch(args: argparse.Namespace):
    """
    Info example:
    {'DeviceID': 13,
     'MessageType': 'Attached',
     'Properties': {'ConnectionSpeed': 480000000,
                    'ConnectionType': 'USB',
                    'DeviceID': 13,
                    'LocationID': 000000000,
                    'ProductID': 4776,
                    'SerialNumber': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
                    'USBSerialNumber': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'}}
    """
    for info in um.watch_device():
        logger.info("%s", pformat(info))

https://github.com/alibaba/taobao-iphone-device/blob/371c3e5226d599575dc4d8d6ff9169c5c021a598/tidevice/__main__.py#L182-L196

rohan-a99 commented 3 years ago

yes

electricbubble commented 3 years ago

@rohan-a99

https://github.com/electricbubble/gidevice/blob/ac5f6d41ca13391f2631a12beca90397513b2f90/usbmux_test.go#L43-L67

rohan-a99 commented 3 years ago

thanks!!!... Can you update this on your gidevice-cli releases please

electricbubble commented 3 years ago

electricbubble/gidevice-cli - v0.5.1

rohan-a99 commented 3 years ago

Thank You so much!!

rohan-a99 commented 3 years ago

Hey....i need one more favour please, can you add info service also?

electricbubble commented 3 years ago

Close with electricbubble/gidevice-cli - v0.7.0

Thanks! @wangzi1325