cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iOS SDK (Obj-C) authorisation with dropbox app installed produces error (app needs to be updated)

iOS SDK (Obj-C) authorisation with dropbox app installed produces error (app needs to be updated)

Swissdoode
Explorer | Level 3

Hi everybody!

 

I'm using the iOS SDK installed with cocoapods to authorise a user in order to upload files to DB.

This works, as long as the DB-App isn't installed on my device (the authorisation is then made via Safari).

 

As soon as I install the DB-App and try to allow my app to use DB (in the DB-App), I'm getting an error saying:

«myApp» needs to be updated. The developer needs to update this app so it works with this iOS-Version. (or something along these lines - had to translate the error from German).

 

I'm building the app with the latest XCode and SDKs, using a current signing-profile, etc.

The app works totally fine under the latest iOS version.

 

Any ideas what could cause this?

6 Replies 6

Greg-DB
Dropbox Staff

[Cross-linking for reference: https://stackoverflow.com/questions/76847429/dropbox-ios-sdk-obj-c-authorisation-with-dropbox-app-in... ]

 

First, for reference, can you share the version number of the Dropbox SDK that got installed by Cocoapods, and also share a screenshot of the screen with the error message so we can check on this specifically? Thanks in advance!

Swissdoode
Explorer | Level 3

Hi Greg.

Thanks for getting back to me.

I'm using ObjectiveDropboxOfficial (7.1.1)

I attached a screenshot of the error message (it's in German, though).

 

The error occurs when the DB-App is supposed to send me back to my App (StoryCatcher)

 

IMG_7315.PNG

Greg-DB
Dropbox Staff

Thanks! I'm trying this out now, but I can't seem to reproduce that error. From what I can tell though, it's actually coming from iOS itself and not directly from the Dropbox iOS app.

 

Given that you mentioned it occurs when the Dropbox app would be sending you back to your app, it sounds like it would be related to the URL scheme functionality that the Dropbox app and SDK use to coordinate that. Can you check that you've implemented everything from the "Application .plist file" section of the documentation as shown there? That's the configuration that allows the SDK and app to work together for that flow.

 

Otherwise, can you confirm which particular version number of iOS you're seeing this with? Have you tried any other versions and if so, which and do they work or not work?

Swissdoode
Explorer | Level 3

Hi Greg

Thanks for your reply.

I checked my plist file and everything's as described in the document you linked to.

 

I am using the latest iOS-version.

 

One thing: When the DB-App is not installed, the authorisation flow works perfectly.

Now I saw in the document, that there should be a way to use «Safari view controller auth» instead of «Direct auth». But the document doesn't say how I'd implement this. I'd prefer to go with that approach since it proved to work before. Any hints how to tell my app to use Safari instead of the DB-app?

 

[Edit]

I just saw in another thread (from 2017) that the Safari auth can't be forced. Is this still the case?

 

Is the name I gave my app in the DB dev-console somehow related to the app's name in XCode?

 

Plus: The delegate method application:openUrl:options is never called when the DB app tries to re-open my app. This just an FYI...

Swissdoode
Explorer | Level 3

Hi again, Greg…

 

I feel a bit stupid right now.

I found out that I had the app TWICE on my device. One was buried somewhere I didn't see it.

That apparently caused all sorts of confusions for the os.

I deleted both apps, installed the newest one again - and now it's working.

 

Such a stupid error…

Thanks a ton for your time, though!!!

Greg-DB
Dropbox Staff

Thanks for following up. I'm glad to hear you got this sorted out.

 

Just for reference, to answer your questions:

 

The SDK still doesn't offer an option to force the browser flow, but it sounds like that's no longer needed in your case anyway since you got this working.

 

While the app name you register on Dropbox should match the app name you use in Xcode, etc. (to avoid confusing users), it doesn't directly affect any such functionality.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Swissdoode Explorer | Level 3
What do Dropbox user levels mean?