I need a quick and easy way to store files with unique file names on iOS. I need to prefix the file with a string, and then append the generated unique identifier to the en
Here is what I ended up using in Swift 3.0
public func generateUniqueFilename (myFileName: String) -> String { let guid = ProcessInfo.processInfo.globallyUniqueString let uniqueFileName = ("\(myFileName)_\(guid)") print("uniqueFileName: \(uniqueFileName)") return uniqueFileName }