Need to see if your shared folder is taking up space on your dropbox đšâđ»? Find out how to check here.
Forum Discussion
gcarl
5 years agoExplorer | Level 4
iOS - Problems connecting from own app to Dropbox when Dropbox App is installed
Dear community,
since a few days I have the following strange situation.
I have developed an app for iOS which can store data on the Dropbox. The connection is set up as described in the ...
muthulingam
5 years agoExplorer | Level 3
Hi Sir,
i am facing the similar issue .....
1) if "dropbox" app was already installed, then as per the documents, "This launches the official Dropbox iOS app (if installed), authenticates via the official app, then redirects back into the SDK" ... but it does not happens
2) if "dropbox" app was not installed, then there is no problem.(it shows the Authentication screen)
->> i followed exact steps which you guys are described in the tutorials ... (thats why it is working for "non Dropbox app installed" iOS devices.
here is the code snippets related to authentication workflow
in AppDelegate.m (in objective c)
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[PhotoPickerEngine.sharedEngine setupSocialNetworks];
}
- (BOOL)applicationđUIApplication *)app openURLđNSURL *)url optionsđNSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
NSString *urlString = [[[url absoluteString] componentsSeparatedByString:@":"] objectAtIndex:0];
if ([urlString isEqualToString:@"db-xxxxxxxxxxâ])
{
[PhotoPickerEngine.sharedEngine handleRedirectURLWithUrl:url]; //dropbox to handle
}
}
//swift code
@objc public func setupSocialNetworks()
{
DropboxClientsManager.setupWithAppKey(âAPP_KEYâ)
}
@objc public func handleRedirectURL( url: URL)
{
DropboxClientsManager.handleRedirectURL(url, completion: { (authResult) in
switch authResult {
case .success(let token):
print("Success! User is logged into Dropbox with token: \(token)")
EventHub.post(DropboxLoginEvent())
UserDefaults.standard.set(token.accessToken, forKey: Constants.keyAccessTokenDropbox)
case .cancel:
print("User canceld OAuth flow.")
case .error(let error, let description):
print("Error \(error): \(String(describing: description))")
case .none:
break
}
})
}
the version number of the Dropbox SDK : 6.0.3
the version number of the Dropbox iOS app : 258.2.2
the version number of iOS : 15.0.1
can you please help me how to fix this issue?
Thanks ,
muthulingam
Greg-DB
Dropbox Community Moderator
5 years ago[Cross-linking for reference: https://github.com/dropbox/SwiftyDropbox/issues/345 ]
muthulingam Thanks for the report. I just tried reproducing this with the same version of the Dropbox SwiftyDropbox SDK and Dropbox app, but it worked successfully for me. My test device is on iOS 15.0.2 though, so it may be worth updating your iOS installation to see if that helps.
Can you elaborate on what you mean when you say "but it does not happens"? What output/error do you get?
By the way, the latest version of the Dropbox SwiftyDropbox 8.2.0. I recommend updating to that, and updating your code to the latest version of the authorization flow as documented.
About 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!