How can I programmatically get the MAC address of an iphone

后端 未结 12 2163
春和景丽
春和景丽 2020-11-22 08:06

How to programmatically get an iPhone\'s MAC address and IP address?

12条回答
  •  没有蜡笔的小新
    2020-11-22 08:42

    It's not possible anymore on devices running iOS 7.0 or later, thus unavailable to get MAC address in Swift.

    As Apple stated:

    In iOS 7 and later, if you ask for the MAC address of an iOS device, the system returns the value 02:00:00:00:00:00. If you need to identify the device, use the identifierForVendor property of UIDevice instead. (Apps that need an identifier for their own advertising purposes should consider using the advertisingIdentifier property of ASIdentifierManager instead.)

提交回复
热议问题