Hey,
This is my code. I have the url of the smb server which I have connected in the 'Files' app. It finds the file on the server, but I always says that it has no permission to read it. On my server I have allowed everyone to read and write. Do I need to write something in my code that my app knows that it has permission to read ?
let url: URL = URL(fileURLWithPath: "/private/var/mobile/Library/LiveFiles/com.apple.filesystems.smbclientd/xVUdQwTestApp/testaufbau.csv")
do
{
let fileURLs = try FileManager.default.contentsOfDirectory(at: url, includingPropertiesForKeys: nil)
Admin.fileContent = try String(contentsOf: fileURLs[0], encoding: .utf8)
print("ADMIN: \(Admin.fileContent)")
}
catch
{
print(error)
}
Thank you for all the help
Regards,
Tell Tobler