ios - Generate random numbers among multiple devices -


I am writing an app that includes uploading images. One concern I use Amazon S3 to store those files is that I will have to give each file a specific file name.

On every iOS device, I use the arc4random_unique function to generate random numbers.

My question is, will this method cause repetition in many devices?

Because as far as I know, if I use Rand over time, then if two users try to upload images at the same time, rand ( ) function will give exactly the same results.

  NSString * GUID = [[NSString alloc] init]; CFUUIDRef UUID = CFUID Crack (faucet); CFStringRef String = CFUUIDCreateString (NULL, theUUID); CFRelease (theUUID); GUID = (__breeze NSString *) string; CFRelease (string); Return [GUID lowercase string];  

Comments