How to get unique id in iOS device?

后端 未结 6 1048
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 02:42

I have used mac address to identify iOS devices in server side. When run my application with iOS 7 unable to retrieve the correct mac address. Alternately i used

         


        
6条回答
  •  攒了一身酷
    2020-11-27 03:19

    Getting device ID in

    Swift 3

    let device_id = UIDevice.currentDevice().identifierForVendor?.UUIDString
    

    Swift 4:

    let device_id = UIDevice.current.identifierForVendor!.uuidString
    

提交回复
热议问题