We should create IntermediateDirectories in the export url.like this: if FileManager.default.fileExists(atPath: {DirectoryPath}) == false { try? FileManager.default.createDirectory(atPath: {DirectoryPath}, withIntermediateDirectories: true, attributes: nil) }