There is a good way to do this, and one earlier answer almost had it - generate a GUID for each image, and not for the whole process. Call this method whenever you need a unique string, and then save it in a managed entity:
+ (NSString *)getUUID { CFUUIDRef theUUID = CFUUIDCreate(NULL); CFStringRef string = CFUUIDCreateString(NULL, theUUID); CFRelease(theUUID); return [(NSString *)string autorelease]; }
I use this to store captured movies and images.
source share