Trace keys accessed on the NSDictionary used by Apple's Bluetooth API
Apple's Bluetooth API doesn't say what config dictionary should be provided for [IOBluetoothDevice openL2CAPChannelSync:withPSM:withConfiguration:delegate:].
The keys/values I'm suppose to provide are unknown to me. To overcome this, I wish to send an empty dictionary to the API call, but behind the scenes - track which keys开发者_开发知识库 are accessed.
How do I build a subclass of NSDictionary that will NSLog the accessed keys?
For the IOBluetoothDevice
options, you should look in IOBluetoothDevice.h
:
// These are for the configuration of L2CAP Channels:
#define kIOBluetoothL2CAPChannelMaxAllowedIncomingMTU @"MaxAllowedIncomingMTU"
#define kIOBluetoothL2CAPChannelDesiredOutgoingMTU @"DesiredOutgoingMTU"
精彩评论