Documentation states:
If destinationFilePath is null, a temporary file is created automatically.
The temporary filename is based on the current date:
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyyMMddHHmmss"
let fileName = dateFormatter.string(from: Date()) + ".jpg"
A conflict occurs if saveImageFileAsJpeg is called multiple times within the same second, which causes the temp file to not be unique. This can happen when selecting and processing multiple photos.
Documentation states:
The temporary filename is based on the current date:
A conflict occurs if
saveImageFileAsJpegis called multiple times within the same second, which causes the temp file to not be unique. This can happen when selecting and processing multiple photos.