• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to create a GUID?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create a GUID?


  • Subject: Re: How to create a GUID?
  • From: "Chris Suter" <email@hidden>
  • Date: Mon, 8 Sep 2008 22:13:56 +1000

On Mon, Sep 8, 2008 at 8:28 PM, I. Savant <email@hidden> wrote:

> On Sep 7, 2008, at 10:44 PM, Adam R. Maxwell wrote:
>
>  In addition to all the CFUUID solutions, there's also [[NSProcessInfo
>> processInfo] globallyUniqueString]; a one-liner, but not thread safe.
>>
>
>  This, according to the documentation, "includes the host name, process ID,
> and a time stamp, which ensures that the ID is unique for the network."


>
>  I admit that I do not know "everything there is to know" about the
> subject, but as I recall from the very wiki page I originally posted, this
> is not "unique enough" across all computers in the world.
>
>  Can anybody verify this?


On Leopard (and possibly earlier–I haven't checked), it appears that the
string returned is actually a UUID created with the CFUUID functions
concatenated with the process ID and the result of mach_absolute_time() so
the result isn't a proper UUID. I'm not sure where the host name is coming
from; it's possible that the CFUUID functions incorporate it somehow.

-- Chris
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: How to create a GUID?
      • From: Phil <email@hidden>
References: 
 >How to create a GUID? (From: Meik Schuetz <email@hidden>)
 >Re: How to create a GUID? (From: "Adam R. Maxwell" <email@hidden>)
 >Re: How to create a GUID? (From: "I. Savant" <email@hidden>)

  • Prev by Date: NSTableView bindings and current selection
  • Next by Date: Re: User input while reading document
  • Previous by thread: Re: How to create a GUID?
  • Next by thread: Re: How to create a GUID?
  • Index(es):
    • Date
    • Thread