如何能稳定获取各个版本的安卓手机和iOS手机的mac地址??
1、andriod
WifiManager manager = (WifiManager) getSystemService(Context.WIFI_SERVICE); WifiInfo info = manager.getConnectionInfo(); String address = info.getMacAddress();
2、ios override func viewDidLoad() { super.viewDidLoad() print(UIDevice.current.identifierForVendor) print(UIDevice.current.identifierForVendor?.uuidString) }
赞0
踩0