Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Authentication to dropbox on tvOS

I am using dropbox sdk in my ios mobile app ,it uses dropbox authentication fetches users files from dropbox in my application .. its working perfectly on my ios application and its uploaded on apple store . i want to make it available for tvos apple stores also.

but i am unable to authenticate to dropbox in tvos , as it opens authentication dialog to login and there is no 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?

after searching i have found many references but their are no proper documentation for tvos platform. i have looked up following links but unable to authenticate in tvos

authentication to dropbox via dropboxDevelopers

dropbox community forums

dropbox api sdks

enter image description here enter image description here

Any help/suggestion to this would be very helpful to me...

like image 538
ShujatAli Avatar asked Feb 23 '16 12:02

ShujatAli


People also ask

Can you access Dropbox on Apple TV?

To configure a connection to a cloud service like Dropbox, Google Drive or OneDrive on your Apple TV, you need to use an iPhone or iPad.

How does the Dropbox API handle authentication?

In general, the Dropbox API uses HTTP POST requests with JSON arguments and JSON responses. Request authentication is via OAuth 2.0 using the Authorization request header or authorization URL parameter.

Can you use Dropbox with Apple?

You can access your Dropbox account, and your Dropbox files, with the Dropbox mobile app for your phone or tablet (including Android, iPhone, and iPad).


1 Answers

As suggested by Apple at the Apple TV Tech Talks 2016 (Best Practices for Designing tvOS Apps, min. 12), the main pattern that should be used when you need to collect data from Apple TV users is to redirect them to the web or to a companion app.

As it happens in the screenshot you posted, the tvOS app should ask the user to visit a website in order to insert a code and log into using the Dropbox credentials.

You can also ask your user to download/open a companion app on iOS. This is suggested when you have multiple fields to fill.

In both cases you can poll the server every 5-10 seconds to check if the user logged into successfully or not. As suggested in the first link you've posted, you can try to take a look to Digits by Twitter now supporting tvOS. Also note that UIWebView and SFSafariViewController aren't available on tvOS.

like image 153
Nicola Giancecchi Avatar answered Oct 17 '22 20:10

Nicola Giancecchi