To uniquely identify an App in iOS 6 and above you use this code:
UIDevice.currentDevice().identifierForVendor
Is there an equivalent for Mac OSX?
The MAC doesn't have anything equivalent to iOS's identifierForVendor or advertising Id alas.
For the record and users searching SO for this matter: Apple documentation about validating a purchase receipt gives the implementation tip to get the GUID of a Mac, as the equivalent procedure for identifierForVendor: Get the GUID in macOS
It is MAC address based, but is the choice of Apple for purchase hash control.
来源:https://stackoverflow.com/questions/36209097/mac-app-store-app-and-identifierforvendor