Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hi, I have developed an application in Xcode (macOS) for iOS and I have integrated the SwiftyDropBox API. I have followed all the instructions in the README, but when I make a call to open a link to DropBox I get the following error.
Warning: Attempt to present <SwiftyDropbox.MobileSafariViewController: 0x7fb17981d800> on <Scipple_V2_0.ViewController: 0x7fb177c29d00> whose view is not in the window hierarchy!
I have Googled this to death but can't find an answer.
The initial DropboxClientsManager.setupWithAppKey seems to work (I am using the App Key I get from the App Console in DropBox.
Can anyone give me any suggestions how to fix this?
Thanks
Neil
Hi,
I think you're right but not sure what I was doing wrong, the call is in my viewcontroller, however I tried
DropboxClientsManager.authorizeFromController(UIApplication.shared, controller: UIApplication.shared.keyWindow!.rootViewController!, openURL: { (url: URL) -> Void in UIApplication.shared.open(url, options: [:], completionHandler: nil) })
i.e. using rootViewController instead of self and it worked.
Thanks for your response
Neil
@Greg-DB wrote:When/where are you calling authorizeFromController?
This error message generally indicates that the authorization window can't be displayed because it relies on yourViewController, but theViewController wasn't in the window hierarchy (yet?) at time of the call. Perhaps your ViewController wasn't presented (or was already dimissed) at the time?
When/where are you calling authorizeFromController?
This error message generally indicates that the authorization window can't be displayed because it relies on yourViewController, but theViewController wasn't in the window hierarchy (yet?) at time of the call. Perhaps your ViewController wasn't presented (or was already dimissed) at the time?
Hi,
I think you're right but not sure what I was doing wrong, the call is in my viewcontroller, however I tried
DropboxClientsManager.authorizeFromController(UIApplication.shared, controller: UIApplication.shared.keyWindow!.rootViewController!, openURL: { (url: URL) -> Void in UIApplication.shared.open(url, options: [:], completionHandler: nil) })
i.e. using rootViewController instead of self and it worked.
Thanks for your response
Neil
@Greg-DB wrote:When/where are you calling authorizeFromController?
This error message generally indicates that the authorization window can't be displayed because it relies on yourViewController, but theViewController wasn't in the window hierarchy (yet?) at time of the call. Perhaps your ViewController wasn't presented (or was already dimissed) at the time?
Hi there!
If you need more help you can view your support options (expected response time for a 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!