Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

CarolinaK's avatar
CarolinaK
Helpful | Level 6
9 years ago
Solved

iOS 9.3 Objective Dropbox Official not redirecting to login

In my app, I am testing a migration to v2 and the authorization works very well on the simulator. But once I run the app on my ipod (iOS 9.3), I notice that the only console message I get is 

2017-08-18 16:57:49.804 stubhub[13374:2890161] DBSDKReachability Flag Status: -R ------- networkStatusForFlags
2017-08-18 16:57:49.805 stubhub[13374:2890161] -canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "(null)"
2017-08-18 16:57:49.806 stubhub[13374:2890161] -canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "(null)"

 

and the app just closes the redirect to login after a second, instead of loading the dropbox login screen. Any ideas on how I can solve this? I'm not really sure what's wrong in the device. It works fine on the simulator. 

  • Greg-DB's avatar
    Greg-DB
    9 years ago
    Thanks, it sounds like it is probably specific to that device then. Do you have any restrictions/parental controls enabled on that device currently by any chance?
  • Greg-DB's avatar
    Greg-DB
    9 years ago
    For reference, I've determined that it's the "Websites" > "Specific Websites Only" (without Dropbox allowed) that causes this. I'll ask the team to look into making this fail with some feedback.

9 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    Thanks for the report! Those three lines should be safe to ignore. The first one is just checking the network availability, and the other two are checking for the official Dropbox app, but the "null" error means nothing is wrong.

    Can you elaborate a bit on what happens though? Is the openURL block getting called at all?

    Also, please try the DBRoulette sample app and let us know if it reproduces the same issue on that device:

    https://github.com/dropbox/dropbox-sdk-obj-c/tree/master/Examples/DBRoulette

    Finally, have you tried on another device to see if it's specific to that device? Thanks in advance!
  • CarolinaK's avatar
    CarolinaK
    Helpful | Level 6
    9 years ago
    Hi Greg!

    Update: I was able to login successfully on another device with iOS 10.3. What's happening is that once the app opens the url to go to the login page for dropbox (I don't have the app installed, so safari opens up by default) it just stops loading the login page and returns to my app as if I hit the back button or cancelled the request.

    As I was debugging, I noticed open URL is not getting called. It is getting called in the simulator for 10.3 and 9.3 so I'm not really sure what could be happening other than issues with the device itself.

    Thanks for the quick response!
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    Thanks! I haven't heard of this behavior happening before so we'll have to look into it.

    Just to confirm though, can you try the sample app on that device? It would be good to know if there's something just specific to that device, or if it's something about that combination of iOS version and your code.

    Also what version number of the SDK are you using?
  • CarolinaK's avatar
    CarolinaK
    Helpful | Level 6
    9 years ago

    I'm using v2 SDK. I cloned the master branch on github.

    Also tried to run DBRoulette with cocoapods on the troublesome device (ipod iOS model A1421 version 9.3) and it had the same issue when trying to link my dropbox account.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    Thanks, it sounds like it is probably specific to that device then. Do you have any restrictions/parental controls enabled on that device currently by any chance?
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    Great, I'm glad to hear that's solved.

    Can you let us know what setting specifically was doing it? We can look into it to see if we can detect this scenario and expose an error message in the future.
  • CarolinaK's avatar
    CarolinaK
    Helpful | Level 6
    9 years ago
    Unfortunately I don't have the specific restriction that was causing it, I know that once I disabled parental controls on Settings/General/Restrictions the app was able to load the external login page.
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    For reference, I've determined that it's the "Websites" > "Specific Websites Only" (without Dropbox allowed) that causes this. I'll ask the team to look into making this fail with some feedback.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If 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, Facebook or Instagram.

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!