Can someone help me please? Thanks I have problem with copy file to remote server. file "structure.php" is imported in my Xcode project. My code is bellow:
let fileManager = FileManager.default
let fromURL = Bundle.main.bundleURL.appendingPathComponent("structure.php")
let toURL = URL(fileURLWithPath: "smb://192.168.x.x/web")
do {
try fileManager.copyItem(at: fromURL, to: toURL)
} catch let error as NSError {
if error.code == NSFileWriteFileExistsError {
print("File exists. Trying to replace")
}
}