

Other Windows machines can access share just fine & read, write, etc. Have Windows 10 machine named "Vader" that's always up & running with a physical drive ( X:) shared as //Vader/x with permissions set to Everyone having full control.

So I have problems with "smb".At wit's end.

When I change the code and only search on the device I am programming on and run the simulator to search for this file everything works fine. "smb scheme is not supported" and then some additional errors that he can not write/read the file because he can not access it.

If I run the code as shown, he always gives me the error Print("Failed reading from URL: \(fileURL), Error: " + error.localizedDescription) Var fullString: String = "" // Used to store the file contentsįullString = try String(contentsOf: fileURL, encoding. Print("Failed writing to URL: \(fileURL), Error: " + error.localizedDescription) Try writeString.write(to: fileURL, atomically: true, encoding: 8) Let writeString = "Write this text to the fileURL as text in iOS using Swift" Let fileURL = DocumentDirURL.appendingPathComponent(fileName).appendingPathExtension("txt") Let DocumentDirURL = try! URL(resolvingAliasFileAt: url!) let DocumentDirURL = URL(fileURLWithPath: "/Users/f/d/t/App/Assets/Apps/TestApp") In the code bellow I tried to access the shared folder of my second mac and write the Text "Write this text to the fileURL as text in iOS using Swift" into the file named "Test.txt" and after that I want to read the same file again. I already tried different things(code bellow). I also tried to access my shared folders via this App and yes it worked I can see my shared folders on my Phone.īut there needs to be a way to do it with swift. There is an App in the App Store called "FileExplorer" where you can access these shared folders, but I do not know how they programmed this and with which language. Is there any possible way to do that with swift? I am trying to build an app where I am able to access(read/write) windows/mac shared folders in my local network with swift.
