(self)
return [d for d in _devices if d['ConnectionType'] == 'USB']
Return example:
        [{'ConnectionSpeed': 480000000,
          'ConnectionType': 'USB',
          'DeviceID': 37,
          'LocationID': 123456,
          'ProductID': 4776,
          'SerialNumber': 'xxx',
          'UDID': 'xxx',
          'USBSerialNumber': 'xxx'}}]}
Return example:
        [{'ConnectionSpeed': 480000000,
          'ConnectionType': 'USB',
          'DeviceID': 37,
          'LocationID': 123456,
          'ProductID': 4776,
          'SerialNumber': 'xxx',
          'UDID': 'xxx',
          'USBSerialNumber': 'xxx'}}]}
Return example : [ { ConnectionSpeed : 480000000 ConnectionType : USB DeviceID : 37 LocationID : 123456 ProductID : 4776 SerialNumber : xxx UDID : xxx USBSerialNumber : xxx }} ] }
def device_list(self):
        """
        Return example:
        [{'ConnectionSpeed': 480000000,
          'ConnectionType': 'USB',
          'DeviceID': 37,
          'LocationID': 123456,
          'ProductID': 4776,
          'SerialNumber': 'xxx',
          'UDID': 'xxx',
          'USBSerialNumber': 'xxx'}}]}
        """
        payload = {
            "MessageType": "ListDevices",  # 必选
            "ClientVersionString": "libusbmuxd 1.1.0",
            "ProgName": PROGRAM_NAME,
            "kLibUSBMuxVersion": 3,
            # "ProcessID": 0, # Xcode send it processID
        }
        data = self.send_recv(payload)
        _devices = [item['Properties'] for item in data['DeviceList']]
        return [d for d in _devices if d['ConnectionType'] == 'USB']
def device_list ( self ) : payload = { "MessageType" : "ListDevices" , # 必选 "ClientVersionString" : "libusbmuxd 1.1.0" , "ProgName" : PROGRAM_NAME , "kLibUSBMuxVersion" : 3 , # "ProcessID": 0, # Xcode send it processID } data = self . send_recv ( payload ) _devices = [ item [ 'Properties' ] for item in data [ 'DeviceList' ] ] return [ d for d in _devices if d [ 'ConnectionType' ] == 'USB' ]