Reputation: 23
i have a bt 2.0 device with certified.
i can send/recv data with this bt device with eaaccessory input/output stream.
but i went to get the device's mac address
there is a ios9 eaaccessory header
how can i call this method ??
this app do not need submit to apple store.
Upvotes: 2
Views: 1134
Reputation: 315
Calling accessory.valueForKey("macAddress")
may work, but you might also find that some manufacturers encode the MAC address in the accessory.serialNumber
field.
For example, Epson Bluetooth printers' serial numbers are just their MAC addresses without the : separators.
Upvotes: 0
Reputation: 35392
Try to get value with:
let mac = myAccessory.valueForKey("macAddress")
print("mac address is: \(mac)")
Upvotes: 3