Re: How to create a GUID?
Re: How to create a GUID?
- Subject: Re: How to create a GUID?
- From: Dave Howell <email@hidden>
- Date: Sun, 7 Sep 2008 22:11:02 -0700
On Sat, 6 Sep 2008, Meik Schuetz said:
Dear everyone,
I feel kind of embarrassed to ask, but could someone lead me the
way on how to create an globally unique ID (such as for example
d73e066c-cc88-4d66-be42-94dc091bb571) ?
Best regards and thanks to everyone.
Meik
Since you don't say whether you want to do at run-time or in
programmer time, and others have explained how to do it
programmatically, I'll just throw in the obvious: From Terminal, you
can type "uuidgen". If you do this often, you can do this:
• Select Edit User Scripts from the User Scripts menu (identified by
the script icon in the Xcode menu bar).
• Select Code from the list of script types.
• Click the Add button and select Shell Script.
• Double click the name Shell Script and revise it to GenUUID or some
other appropriate name.
• Add the line echo -n `uuidgen` to the script .
• Change the Output option to Replace Selection.
• Close the Edit User Scripts window.
You can now generate a UUID in Xcode by choosing your new script from
the Code submenu of the User Scripts menu.
You can also assign a keystroke to make this even easier.
Cheers!
Dave Howell, President
Avatron Software, Inc.
(Check out our new Air Sharing app for the iPhone, at http://www.avatron.com/products/airsharing)
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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