问题
Is there any replacement for identifierForVendor
on watchOS (2.X)? I have been reading the documentation but it doesn't look like there's any similar method for identifying the device.
Thanks!
回答1:
You don't need to identify the watch. (hand wave)
A user can un-pair and re-pair different watches — say, to switch between a Sport for the gym and an Edition for cocktails — and from the user's point of view when interacting with software, they appear to be the same watch. (The un/re-pairing process is a bit cumbersome, but some people can and do rely on this behavior.)
If you must identify the user, use identifierForVendor
on the paired iPhone (and pass it to the watch with WatchConnectivity if you need it there).
来源:https://stackoverflow.com/questions/34205421/identifierforvendor-or-similar-for-watchos-2-0