In another post about the 10814 error it said I could ignore the error, but in this case it looks like I'm not getting the instance of DropboxClient even after I log in.
I get the following messages in my debug window:
Spoiler
DropboxViewController.viewWillAppear(_:)
2018-08-06 20:23:28.434567-0500 Gnolaum[35840:1973880] -canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
2018-08-06 20:23:28.437971-0500 Gnolaum[35840:1973880] -canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
When I run the following code:
override func viewWillAppear(_ animated: Bool) {
print("DropboxViewController.viewWillAppear(_:)")
if let client = DropboxClientsManager.authorizedClient {
// List contents of app folder
_ = client.files.listFolder(path: "").response { response, error in
if let result = response {
print("Folder contents:")
for entry in result.entries {
print(entry.name)
self.filenames?.append(entry.name)
}
}
}
} else {
// Present view to log in
DropboxClientsManager.authorizeFromController(UIApplication.shared, controller: self, openURL: {(url: URL) -> Void in UIApplication.shared.openURL(url)})
}
}
This is code I copied from the PhotoWatch sample. It works there. I also don't get the error 10814 in PhotoWatch. Why will my code not work?
In another part of my code, I do notice that I am able to get an instance of DrobpoxClient using
DropboxClient(accessToken:)