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: 

Authentication to dropbox on tvOS

Authentication to dropbox on tvOS

Guy G.7
New member | Level 1

I want to authenticate to dropbox in tvOS. However, when dropbox opens the authentication dialog, there is not way for the user to fill it- the UI does not meet the tvOS requirements. So I want to open a tvOS dialog for username/password. But Is there a way then to take this data to authenticate manually, i.e. using code that will input the dropbox username and password?

Thanks

36 Replies 36

John D.64
New member | Level 1

Hi everyone,

I'm also looking for a way to connect my tvOS app to Dropbox.

DropboxSDK.framework uses WebKit which is not available on tvOS.

On which way should I go ?

Thanks in advance.

Greg-DB
Dropbox Staff

This was discussed earlier in this thread. Please read through it for our recommendation. 

John D.64
New member | Level 1

It's not relevant enough imho

Can you please help more ?

Greg-DB
Dropbox Staff

What do you need help with specifically? What issues are you seeing?

Ameesh K.
New member | Level 1

John - the suggestion was to get the iOS SDK source, add it to your project manually, and compile that way, as opposed to using a pre-built library/framework.

https://opensource.dropbox.com/#api-sdks 

John D.64
New member | Level 1

Auth.swift in SwiftyDropbox is using WebKit:

https://github.com/dropbox/SwiftyDropbox/blob/master/Source/Auth.swift

But there is no WebKit in tvOS...

How can I authenticate to Dropbox on tvOS ?

Cheers,

Ameesh K.
New member | Level 1

g r.1
New member | Level 1

Here's a pretty crude rails implementation of what Gregory above suggested https://github.com/bluwave/tvOSDropboxAccessToken .  

Then once your tv app has the access token and userID, you can call:

Dropbox.handleRedirectURL(NSURL(string:"db-\(appKey)://2/token#access_token=\(accessToken)&uid=\(userID)&token_type=bearer")!)

This feels pretty hacky though.  Need a better way to save that info into Dropbox client. 

 

 

Greg-DB
Dropbox Staff

Thanks for putting this together and sharing it!

A more direct way to save an access token is to use DropboxAuthManager.storeAccessToken:

https://dropbox.github.io/SwiftyDropbox/api-docs/latest/Classes/DropboxAuthManager.html#/s:FC13Swift...

John D.64
New member | Level 1

Hi everyone,

I still can't log in to Dropbox on my tvOS app...

Any help from Dropbox would be much appreciated.

Thanks

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Shane D.5 New member | Level 1
  • User avatar
    ast_shujat a. New member | Level 1
  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    Sam S.45 New member | Level 1
  • User avatar
    Shane D.6 New member | Level 1
What do Dropbox user levels mean?