Ios9 system, access to login screen I get the following error: -canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "(null)",
so , I add "dbapi-2" to LSApplicationQueriesSchemes,
but, the error is still there
لسيب
Can you share the relevant code snippet(s) as well as the relevant section of your app's plist so we can look into this? Thanks in advance!
the code is dropbox SDK,The following is the interface code I wrote:
DBSession* session = [[DBSession alloc] initWithAppKey:appKey appSecret:appSecret root:root];
session.delegate = self; // DBSessionDelegate methods allow you to handle re-authenticating
[DBSession setSharedSession:session];
[session release];
// [DBRequest setNetworkRequestDelegate:self];
return [[DBSession sharedSession] isLinked];
Thanks! That looks right. Do you have the official Dropbox app installed on the device you're seeing this on? (Or are you using the simulator?)
This message is expected even when URL scheme is pre-registered if no app is installed that supports the dbapi-2 URL scheme. The app authorization process should still work by falling back to the in-app flow though. Does the app authorization process still work for you in this case?
thanks your reply,On my device do not have the official Dropbox app, I am using a iphone6 debugging.My application is still debug phase.Although the connection dropbox login screen reported "dbapi-2" mistake, but after waiting for some time, the login screen can display.
It sounds like this is working as expected then. If the Dropbox app is installed, that will be used instead.
Hi guys,
I am getting the error dbapi-2://1/connect" - error: "(null)" when I try to enable dropbox in the simulator however when I try my app in the device I don't get the error because I have the actual dropbox App installed. The problem is when I test my app in the device it will open dropbox to log the user but then after login, it won't come back to my app and if I come back manually, it won't upload files because it tells me the user is unauthorized.
Any advice?
Thanks
It sounds like the canOpenURL part of this is working as expected, and the issue has to do with being sent back to your app after the fact, so please open a new thread with the details so we can help (without spamming the other people on this thread).
When Dropbox account is unlinked and no Dropbox app is installed it fails (in a simulator or in a real device), with error:
-canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "(null)"
If you had signed in to Dropbox and then you uninstall Dropbox app, it still works. But once you unlink it fails.
Victor, this message is expected if the official Dropbox app isn't installed even when URL scheme is pre-registered, but the SDK should fall back to using the built-in auth flow. Is that not what you're seeing? If not, what does happen?
Hi Gregory,
Sorry. It was my fault. I was presenting this:
[[DBSession sharedSession] linkFromController:this];
from the wrong controller.
It's all right now with the dbapi-2 application queries scheme.
Thank you.
Thank you for yours reply.The problem of its own ios9 system.
Hi Gregory
I found the latest Dropbox SDK was released at "Version 1.3.13, updated September 15, 2014". I got this info from: "https://www.dropbox.com/developers-v1/core/sdks/ios", more than 1 year!!!!
Is there any update recently?
Bourne, your question doesn't seem to be directly related to this thread. In the future, please be sure to open new threads for new questions so as not to spam the other people on a thread.
To answer your question though, version 1.3.13 of the iOS Core SDK as posted on the page you linked to is the latest version. We do have a new Swift SDK for API v2 if you want to use that though.
Thanks Gregory
The reason why I asked that (version) is because I have the same issue (I already added "dbapi-2" to LSApplicationQueriesSchemes), so I was wondering whether it's because I'm still using that old SDK (I did download from that website).
Are you still having trouble? If so, what isn't working as expected specifically? Can you share the steps to reproduce the issue, as well as the full error/output you're getting?
Gregory
Here is my code:
if (![[DBSession sharedSession] isLinked]) {
[DBSession sharedSession].delegate = self;
[[DBSession sharedSession] linkFromController:self];
}
and I have followings in .plist
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbauth</string>
<string>dbapi-2</string>
<string>fbauth2</string>
</array>
The console output is:
FFC[21095:2556563] -canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "(null)"
Ok, and what, if anything, isn't working as expected? That message is expected if the official Dropbox app isn't installed, but the SDK should then fall back to the built-in flow, in which case you can just ignore that message. Is this what's happening in your case?
Got the same error. When link controller is opened, I tap Cancel, but open URL delegate method isn't called, i.e. no callback if a user cancel auth process.
If a user grant permissions to my app, I get callback.
SDKv1: cancel flow works correctly.
Thanks Sergey, I see you mentioned this in your new thread, so we'll look into it and follow up there.
Same problem happening with your sample app. I guess it is too much to ask for a working example with the latest iOS system. I know that would take at least 30 minutes to update so I assume you will deprecate core api like you did sync and leave us stranded again. Perhaps I should move my customers elsewhere.
This is after adding code so the the window appears.
2016-02-19 13:47:59.195 DBRoulette[2433:157598] -canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "This app is not allowed to query for scheme dbapi-2"
2016-02-19 13:47:59.200 DBRoulette[2433:157598] Warning: Attempt to present <UINavigationController: 0x7fa0ac837c00> on <RootViewController: 0x7fa0ab739370> whose view is not in the window hierarchy!
Thanks for the report William! The DBRoulette app does need to be updated to register for that URL scheme. I'll send this along to the team.
It appears that many (if not all) are facing the same issue.. No solution yet?!?
Hasan, what issue are you seeing specifically? Apps just need to be updates as shown here:
https://blogs.dropbox.com/developers/2015/08/important-update-your-core-api-app-for-ios-9/
If you've done that and are seeing unexpected behavior, please open a new thread with details:
https://www.dropboxforum.com/hc/en-us/community/posts/new?community_post%5Btopic_id%5D=200209245
Gregory,
Unexpected behavior? It doesn't work. I already had read the post you linked to so your comment was no help. I suggest you try it yourself. Obviously I am not the only one that is having an issue. Regards
HI William, are you referring to the sample app? I was referring to the unspecified issues Hasan mentioned.
We're aware of the issues in the latest version of the sample app, and I do apologize for the inconvenience. Until we released an updated version, you'll need to make the changes to get it to work. If you've done so and still aren't getting it running, please open a thread with the details so we can help. E.g., what changes you've made, the code where it fails, what happens and what you expected to happen, and the output you're getting. Thanks in advance!