Re: Generating Unique ID
Re: Generating Unique ID
- Subject: Re: Generating Unique ID
- From: Chris Hanson <email@hidden>
- Date: Thu, 4 Sep 2003 16:41:18 -0500
On Thursday, September 4, 2003, at 10:14 AM, G Douglas Davidson wrote:
I'd like to tag all of my Object/Records with a Unique ID not tied to
the data in any way and unique across objects. I remember seeing
something in Apple's documentation about some function that produced
this Unique number (does not have to be across machines.) But I can't
seem to find it.
CoreFoundation has CFUUIDRef, which is very easy to either create and
turn into an NSString* (since CFStringRef is toll-free bridged with
NSString*) or to wrap in your own UniqueID class.
This should actually generate UIDs that are unique across machines as
well as on your machine.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.