Obtaining a Unique Device ID

I need a way to uniquely identify a device. The device could be any laptop, desktop, iPad, iPhone, etc. running MacOSX, iOS, Windows, or Linux.

I don’t want to use a MAC ID since ethernet interfaces can be replaced/upgraded. I’m thinking more along the lines of something like

  1. Vendor ID + System Serial #
  2. System UUID (assuming the UUID is globally unique)
  3. CPU ID

Any thoughts on the best way to accomplish this?
How would I go about obtaining the identification from each OS?

The MBS plugins have something for this that works pretty well. No idea how/if it works on iOS.

I stole the following from another post on this forum:

sub getMachineID()
  #If TargetMacOS Then
    Return  SystemInformationMBS.MachineID   //CalculateSystemCode
  #elseIf TargetWin32 Then
    Dim CPUModel as String = SystemInformationMBS.CPUBrandString.Trim
    Dim WinKey as String = SystemInformationMBS.WinProductKey.Trim
    Dim s as New shell
    s.Execute("wmic bios get serialnumber")
    Dim s1() as String = s.Result.Split(EndOfLine)
    Dim BiosSerial as String
      BiosSerial= s1(1).Trim
      System.DebugLog("Bios Serial from Shell: "+BiosSerial)
      BiosSerial = ""
    End Try
    Dim Salt as String = "9878235969809809"
    Dim n as string = System.EnvironmentVariable("COMPUTERNAME").Trim
    Dim m as string = MD5StringMBS(Salt+CPUModel+WinKey+n+BiosSerial).Trim
    Return m
  #elseIF TargetLinux Then
    Dim HostName as String = SystemInformationMBS.HostName
    Dim CPUModel as String = SystemInformationMBS.CPUBrandString
    Dim Salt as String = "9878787328979"
    Dim m as string = MD5StringMBS(HostName+CPUModel+Salt)
    Return m
end Sub

Is there a way to do it without the purchase of a plugin?

You could use declares to call into native functions - that’s all the MBS plugins are doing, mostly.

I won’t recommend to spend hours to save $50 or so.

on iOS you can query some UUIDs, but they can be reset by user.


What do you recommend then? and how would you go about obtaining a UUID (hard coded) on iOS?

[[UIDevice currentDevice] uniqueIdentifier]

maybe? Find the declares…

I believe that is deprecated and will get your app rejected… Search the forum and you should find a thread where I posted some declares for NSUUID which is the acceptable method.

Edit isn’t available. Those declares are also in the Extension module of iOSKit. The function is called “getGUID”.