dropbox-sdk-obj-c
dropbox-sdk-obj-c copied to clipboard
ObjectiveDropboxOfficial cannot authorize my app when dropbox app is installed in same device
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
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 Can you double check that you configured your plist as shown here?
https://github.com/dropbox/dropbox-sdk-obj-c#application-plist-file
@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.
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!
@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.