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
Any help/suggestion to this would be very helpful to me...
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.
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.
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With