Preamble
I am working on Xcode 7.0.1 with Swift 2
Are the hours (update, days) that I am trying to understand how I can get this information.
I saw that there is a CoreBluetooth framework that may possibly help me. (update, definitely not !!)
Any idea? Objective-c / swift / c / C ++ .. whatever .. whatever. Same.
I already tested the code in this answer , but it prints:
→> WIFI MAC ADDRESS: 02: 00: 00: 00: 00: 00
→ →> IPHONE BLUETOOTH MAC ADDRESS: 02: 00: 00: 00: 00: ffffffff
→> IPAD BLUETOOTH MAC ADDRESS: 02: 00: 00: 00: 00: 01
I read the official documentation about this :
In iOS 7 and later, if you request the MAC address of the iOS device, the system returns 02: 00: 00: 00: 00: 00. If you need to identify the device, use the identifierForVendor UIDevice property instead. (Applications that need an identifier for their own advertising purposes should consider using the advertisingIdentifier ASIdentifierManager property.)
Question: if other devices can read my mac bluetooth address, why can't I?
I think there must be a way to do this, of course.
I also try snippets on this answer (and other answers), but I never get a real MAC address.
I know that in order to know the bluetooth information for mac, I can run on the terminal:
system_profiler SPBluetoothDataType | sed -n "/Apple Bluetooth Software Version\:/,/Manufacturer\:/p"
mac, "" :
egrep -o '([[:xdigit:]]{1,2}-){5}[[:xdigit:]]{1,2}'
.. iPhone ?
, :
script = ""
system("system_profiler SPBluetoothDataType > blueInfo.txt")
sleep
read from file "blueInfo.txt" its content
"", , .
):