Given a suggested name like NString *name = @"Lake" :
NSString *myUniqueName = [NSString stringWithFormat:@"%@-%u", name, (NSUInteger)([[NSDate date] timeIntervalSince1970]*10.0)];
EDIT: updated so that the only chance for a duplicate is the same original name sent within 100 ms of the first (almost impossible, in my opinion, if this is a problem, use 100 instead of 10)
source share