Open ghost opened 6 years ago
The canOpenURL
10814 errors themselves are expected if the official Dropbox app isn't installed, so they're safe to ignore. (The SDK checks if the official app is installed, and would use that for the authorization flow if it is. If it isn't though, it will fall back to an in-app flow.)
It sounds like you're getting a blank page when calling authorizeFromController
though. That would be unrelated to the canOpenURL
errors. This can occur when the controller passed to authorizeFromController
isn't the topmost view controller. So, you instead just need to make sure you're passing in the top most view controller. This may depend on the exact view set up for your app, but for example it may look like this:
[DBClientsManager authorizeFromController:[UIApplication sharedApplication] controller:[UIApplication sharedApplication].keyWindow.rootViewController openURL:^(NSURL *url){
[[UIApplication sharedApplication] openURL:url];
}];
If that doesn't seem to help, please share:
By the way, I deleted your second comment. In the future, please do not spam mention others. The Dropbox employees you mentioned do not work on the Objective-C SDK and won't be able to offer help with this issue. The people that can help regularly review newly posted issues and will reach out to offer help as I've done here. Thanks!
Thanks!
sdk version is 3.1.2
iOS 10.3
I tried the way you give me, but it was not working well.
i find a way ,that tap the setting and click safari and clear history and website data.then it works well...
But when i click done button in web or unlink after login in ,this issue comes back.
- (BOOL) dropboxIsLinked { if ([DBClientsManager authorizedClient]) { return YES; } else { [self dismissPopoverAnimated:NO]; [DBClientsManager authorizeFromController:[UIApplication sharedApplication] controller:self openURL:^(NSURL *url) { [[UIApplication sharedApplication] openURL:url]; }]; return NO; } }
Thanks! Version 3.1.2 is a bit old now though, and there have been various bug fixes since then, so please update to the latest version, currently v3.3.4 and let us know if you're still seeing the issue.
Thanks!
I have update the version to v3.3.4 ,but it doesn't work....maybe ,it's reason of the DBSafaricontroller 's webview cache. that , when i tap the setting and click the safari to clear the cache and website data ,it becomes well. a suggestion for you ...how to solve it ? maybe ,i would let my users to clear safari 's cache when the find this issue , now this is the only way for this issue ,i can't find another way...Waiting for you reply. Thank you again ,show enthusiasm for my question...
Thanks! I can't seem to reproduce this.
What version(s) of iOS are you seeing this with? Does it reproduce for you in the DBRoulette example app?
I have exactly the same trouble. Works fine when dropbox app is installed but the web page loaded up is blank. This is a landscape only app incidentally. if I clear the cache in safari it pops up fine.
@kallipigous Can you confirm you're passing in the topmost controller and are using the latest version of the SDK, per my earlier comments?
If so, please let me know what versions of iOS you're seeing this with, and if it reproduces with the example app.
Yup 'm passing the top controller and I'm using the most recent version of ios11.
I'll try with the example app.
I can confirm that dbroulette does work (though it just uses self for the viewcontroller) but the same code in my app does not. I get a white screen with a blank toolbar. When I clear the cache in safari and go back to my app it refreshes and appears.
@kallipigous Thanks! To clarify though, I was referring to the latest version of the Dropbox SDK, not iOS itself.
Anyway, we haven't been able reproduce this version of this issue (where it's not about the view controller). That being the case, can you provide a small sample project that does reproduce it? That would be helpful in investigating. Thanks in advance!
I'll have a look though it will be difficult to parse out. For the time being I'll have to insist people have the dropbox app installed. I'll keep playing though and let you know if anything.
Thanks: The version is iOS 10 and Xcode is 8.It does’t reproduces in example app, just in my self. I have tried the way of that you have given to me — use topmost controller.
@andywangzhen Thanks! As discussed with kallipigous, we haven't been able to reproduce this behavior, and since it doesn't reproduce for you in the example app, it does seem to be related to something specific to your app. I hate to be a bother, but that being the case, we will need a small sample project that reproduces the issue to be able to investigate further. If you would be able to supply one, that would be very helpful.
Is this issue still there?
@shriyaMadan Unfortunately we were never able to reproduce the issue reported here. Are you seeing this issue yourself? If so, please share a sample project that demonstrates it so we can look into it.
the console log is "-canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"and "-canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)""