marc said it all but here is the code (found mostly on SO anyways ;))
//from http://stackoverflow.com/questions/2633801/generate-a-random-alphanumeric-string-in-cocoa
-(NSString *) randomStringWithLength: (int) len {
static NSString *letters = @"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
NSMutableString *randomString = [NSMutableString stringWithCapacity: len];
for (int i=0; i<len; i++) {
[randomString appendFormat: @"%C", [letters characterAtIndex: arc4random_uniform((u_int32_t)letters.length)]];
}
return randomString;
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
id basename = @"myFile";
id extension = [self randomStringWithLength:3];
id filename = [basename stringByAppendingPathExtension:extension];
NSLog(@"%@", filename);
return YES;
}