FileManager Copy file to remote server.

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")

                }

            }

I have problem with copy file to remote server.

What platform are you targeting?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hi, iPhone 12 PRO with iIOS 16..2

FileManager Copy file to remote server.
 
 
Q