Saving file to desktop from macOS app
let homePath = FileManager.default.homeDirectoryForCurrentUser
let desktopPath = homePath.appendingPathComponent("Desktop")
print(desktopPath)
let filePath = desktopPath.appendingPathComponent("TestFile.txt")
do {
try unicodeString.write(to: filePath, atomically: false, encoding: .utf8)
} catch {
errorMessage = error.localizedDescription + "\n" + unicodeString
}