We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
Anthony B.15
7 years agoExplorer | Level 4
Xcode 9 simulator DropboxClientsManager.authorizeFromController failing.
Using SwiftyDropbox 4.3.0 on iOS. I'm trying to link my app to my Dropbox account on the latest iOS simulator and it is failing with the following errors: -canOpenURL: failed for URL: "dbapi-2://1/...
- 7 years ago
We've seen this happen when the controller passed in to authorizeFromController isn't the top-most controller. The solution would be to make sure that you're passing the top-most view controller when authorizing. For example, with the UISplitViewController case, it's not necessarily self. Can you check if that's what's happening in your case?
Anthony B.15
Explorer | Level 4
Just a follow-up. This only seems to be happening with the iPad simulator in Xcode 9.2. I've not seen it occur when using one of the iPhone simulators. Seems kind of like an Xcode simulator bug but I can't say for sure.
Would appreciate if anyone else could confirm this.
Greg-DB
7 years agoDropbox Staff
That's correct, these 10814 errors are expected when the official Dropbox iOS app isn't installed, and the SDK should automatically fall back to processing the app authorization flow in Safari in that case. (More specifically, it should present a SFSafariViewController with the OAuth 2 app authorization flow on the Dropbox web site.)
I just tried this in an iPad simulator with Xcode 9.2 though, and it worked for me. Can you elaborate on what does/doesn't happen for you? Does the SFSafariViewController not get presented at all? Does it happen in multiple iPad simulators? If not, you may want to try resetting that particular simulator in case it's somehow in a broken state.
I just tried this in an iPad simulator with Xcode 9.2 though, and it worked for me. Can you elaborate on what does/doesn't happen for you? Does the SFSafariViewController not get presented at all? Does it happen in multiple iPad simulators? If not, you may want to try resetting that particular simulator in case it's somehow in a broken state.
- Anthony B.157 years agoExplorer | Level 4
The SFSafariViewController does appear but it just seems to hang. It doesn't load the login page and doesn't even show any browser controls.
I've done a little more testing and now find that this only occurs in portrait mode of all the iPad simulators. In landscape mode it works ok. About the only difference here is that I am using a UISplitViewController, but my "link" button is always in the same view controller. In either case, I initiate the authorization sequence as follows:
DropboxClientsManager.authorizeFromController(UIApplication.shared,
controller: self,
openURL: { (url: URL) -> Void in UIApplication.shared.openURL(url)
})
This behavior is strange considering that all this worked correctly before Xcode 9.
Thanks for the help. I'll keep experimenting.
- Greg-DB7 years agoDropbox Staff
We've seen this happen when the controller passed in to authorizeFromController isn't the top-most controller. The solution would be to make sure that you're passing the top-most view controller when authorizing. For example, with the UISplitViewController case, it's not necessarily self. Can you check if that's what's happening in your case?
- Anthony B.157 years agoExplorer | Level 4
Hi Greg. Yes it seems you nailed it.
In my case the solution is to pass the secondary (detail) VC when the UISplitViewController.displayMode is PrimaryOverlay (portrait). By passing 'self' I am passing the top-most VC in the primary view controller (a UINavigationController). Evidently this is ok when the displayMode is AllVisible (landscape).
I like UISplitViewController, but it can create some interesting challenges.
Thanks for your help!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!