iphone - Generating a unique ID in Objective C -
iphone - Generating a unique ID in Objective C -
how unique ids in objective c. want create unique id session & generate id each time server phone call happens. each time id should unique.
i tried using cfuuid class gives huge unique id (4fe9d00c-531e-45e8-b10e-11968acc36e9). want unique id of smaller size.
any clue?
a guid (by shear combinations) generates unique id. if it's less characters want 1 alternative base64encode guid. allows 64 possibilities per char instead of 16 (0-9, a-f)
this:
540c2d5f-a9ab-4414-bd36-9999f5388773
becomes:
xy0mvkupfes9npmz9tihcw
for example: (c# though) http://www.singular.co.nz/blog/archive/2007/12/20/shortguid-a-shorter-and-url-friendly-guid-in-c-sharp.aspx
here's post on objective-c encode/decode (look @ mike ho post):
any base64 library on iphone-sdk?
iphone objective-c ios cocoa-touch
Comments
Post a Comment