How to get Apple Watch Unique id or UDID or Serial Number Programatically?

最后都变了- 提交于 2019-12-10 18:04:20

问题


I want to read any unique info like UDID or serial number programmatically in apple watch. Is there any way to get it ?? I want to get programatically not manually via xcode..


回答1:


WatchOS3 does not have any UIDevice-like API to get even identifierForVendor or advertisingIdentifier, not talking about UDID.

If you need something unique to concrete watch device, workaround I can suggest is putting random UUID to watch's Keychain on first launch and use it as if it was UDID. Theoretically, items in Keychain are persistent between app installations, but worth checking if they stay between iphone-watch pairings.



来源:https://stackoverflow.com/questions/32102202/how-to-get-apple-watch-unique-id-or-udid-or-serial-number-programatically

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!