Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjectiveDropboxOfficial cannot authorize my app when dropbox app is installed in same device #195

Open
Ranjan911 opened this issue Nov 3, 2017 · 4 comments

Comments

@Ranjan911
Copy link

Ranjan911 commented Nov 3, 2017

I integrated ObjectiveDropboxOfficial SDK of dropbox into my app. I followed the dropbox tutorial provided and was able to authorize the app and do further dropbox operations like upload and download.
It worked well.

But if the same app is installed in a device which already has dropbox app installed, then the app is unable to get authorize from dropbox.
When my app call following code:

[DBClientsManager authorizeFromController:[UIApplication sharedApplication]
                                 controller:[[self class] topMostController]
                                    openURL:^(NSURL *url) {
                                      [[UIApplication sharedApplication] openURL:url];
                                    }];

The app goes to background and dropbox app gets open asking to allow access for dropbox. Here is the screenshot
img_0124
When i tap allow, it goes back to my app and nothing happens. So, i again try to access dropbox in my app, it again goes to dropbox app and again ask for authorization. So, my app never gets authorized with dropbox.

Is there anyone, who faced similar problem while integrating ObjectiveDropboxOfficial SDK? Is there any cure for this?

@Ranjan911 Ranjan911 changed the title ObjectiveDropboxOfficial cannot authorize app when dropbox app is installed in same device ObjectiveDropboxOfficial cannot authorize my app when dropbox app is installed in same device Nov 3, 2017
@greg-db
Copy link
Contributor

greg-db commented Nov 3, 2017

@Ranjan911 Can you double check that you configured your plist as shown here?

https://github.com/dropbox/dropbox-sdk-obj-c#application-plist-file

@Ranjan911
Copy link
Author

Ranjan911 commented Nov 3, 2017

@greg-db Yes, i have cross-checked and its all fine, because, dropbox works well when there is no dropbox app installed in my device.
It fails to authorize when there is dropbox app installed in device.

@greg-db
Copy link
Contributor

greg-db commented Nov 3, 2017

For reference then, can you try configuring and running the example app, to see if the same issue appears there? That should help narrow down where the issue is. Thanks in advance!

@scobbe
Copy link
Contributor

scobbe commented Nov 3, 2017

@Ranjan911: In addition to Greg's request, can you try running this command:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

Sometimes if you have another build with the same app key, the redirect gets confused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants