Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
I have a website I am developing which includes dropbox "chooser" functionality. Everything was working great in all of my testing so far, but when I created a shortcut to the website on the iOS desktop, dropbox chooser broke. The behavior I'm seeing now is when I click the button which invokes chooser, I immediately see the "unable to communicate with parent window" message at the login screen. It allows me to log in and navigate to the file I wish to select, but when I actually try to select it, I again see the "unable to communicate with parent window" message, and I'm unable to continue.
Because the dropbox functionality works fine when the website is viewed in the "normal" Safari browser, but not when Safari is launched via the iOS desktop shortcut, I'm thinking this is an issue which you need to look into, rather than something I messed up on my end. Here's the code I have in my web page, which is pretty vanilla:
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="MYKEYHERE"></script>
On my button I have the following:
function startDropboxProcess() {
Dropbox.choose({
success: function(files) {
// Do something with the returned file
},
cancel: function() {
hidePleaseWait();
},
linkType: "direct",
multiselect: false,
extensions: ['.pdf'],
});
}
The iPad tells me it is running iOS 8.3. I can't seem to find what version of Safari it's using.
Moved to the API forum.
I'm not aware of a way to work around this issue. If we're blocked from communicating between the two browser windows, then the Chooser can't function.
@Steve M, that's a bummer. So, just to clarify, is the issue essentially that when Dropbox chooser is run in a "normal" Safari browser it opens as a popup, but when chooser is run from within a "desktop shortcut" version of Safari it opens as an entirely new window?
FYI, this problem went away when I removed the following meta tag from my HTML:
<meta name="apple-mobile-web-app-capable" content="yes" />
It seems that meta tag not only hides some of the Safari UI, it also forces it into "standalone" mode which makes it act differently than the normal Safari browser. My application depends on DropBox integration, so I'd rather have that working and lose some screen real estate, than have a nice full screen app that doesn't work.
Great! Thanks for following up with what you found.
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!