I am a little bit new to Swift and I am not able to use FileProvider correctly.
I am trying to copy a file from a WebDav server to my local folder.
let credential = URLCredential(user: "username", password: "password", persistence: .permanent)
let webdavProvider = WebDAVFileProvider(baseURL: URL(string: "https://webdav.server.url")!, credential: credential)
let fileURL = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.appendingPathComponent("my document.doc")
_ = webdavProvider?.copyItem(path: "/Folders/Dir/my document.doc", toLocalURL: fileURL, completionHandler: nil)
I have no error, or no return but the file is not downloaded (I can't see it in Files)...
How to use the functions correctly?
I am not sure how to use the delegate functions, can you explain?
However i can upload a file and download with ftp.
This looks like a great pod but, is there a way to work with UIDocument subclasses?
Say i want to build a custom document class to host my apps' model information and i want to use this pod is there any way yo write out the document to disc? i only found methods that write Data objects and there didn't seam to be any way to extend its functionality, any comments on the subject will be welcome
Hey, i have one question and i'm not sure how to solve my problem. I have a list of files in local storage, which i want to copy to the NSTempDirectory. So far no problem. But i want to wait so long until the fileprovider copied the last item from the list to the final destination succesfully and then i want to give the new URLs back in the method return like so
func copyItemsTOTempDir(paths: [String]) -> [URL]?
So my Problem is that the function copyItem is a async function with a completionhandler or delegate, which will be called after every copy action. But how can i recognize that All paths in the list are completely copied?
Is there any expectation, when the SMB support will be finished?
In iOS 11 / Xcode 9.0, Apple introduced a new framework with previously existing classes as `FileProvider` which may cause name conflict.
To address this issue, since version 0.18.0 onward, the framework name has been changed to **`FilesProvider`**, which has an extra `s` to `File`. You must change all import statements accordingly.
- **Important:** You must clear derived data before run, by holding `option` key and click `Product -> Clean Build Folders...`
- Update project name in podfile if you're using Cocoapods