Get MAC address of bluetooth low energy peripheral in iOS

前端 未结 5 506
遥遥无期
遥遥无期 2020-11-28 04:05

I am currently working on an iOS application based on bluetooth low energy devices. In order to get a unique identifier to compare the peripherals got, I have to get the MAC

5条回答
  •  天命终不由人
    2020-11-28 04:59

    Updated Answer :-

    After iOS 12 we can get UDID

       print(UIDevice.current.identifierForVendor)
    
       print(UIDevice.current.identifierForVendor?.uuidString)
    

    Before iOS 12**

    There is no public API to get this information.

    If this is an internal or jailbreak application you can get the value of the kLockdownBluetoothAddressKey key via liblockdown.dylib

提交回复
热议问题