8

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...

ShujatAli
  • 1,376
  • 2
  • 14
  • 26

1 Answers1

4

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.

Nicola Giancecchi
  • 3,045
  • 2
  • 25
  • 41
  • giacecchi as mentioned , Dropbox doesnot have documention/sampleCode for authentication via code and log into its account. I know twitter has offered us to login via code and authentication process is done on tvos . but their is no code sample or web api to login via code. let me know if you found any working documentation or code sample – ShujatAli Mar 03 '16 at 08:21
  • 2
    @shujatAli have you tried tvOSDropboxAccessToken by bluwave? It seems fit your needs... You can find it on GitHub: https://github.com/bluwave/tvOSDropboxAccessToken – Nicola Giancecchi Mar 04 '16 at 20:23
  • Thanks for guilde above link source is written on rails and i want objective c. I dont know how to run rails on tvos.. I have also tried these code but these samples are incomplete https://github.com/bluwave/DropboxPhotoAlbumTV Following sample is working but no documentation provided https://github.com/bluwave/TVOAuthCircumventAssistant see screenshot http://imgur.com/38zZbCi – ShujatAli Mar 08 '16 at 07:44
  • Finally i was able run rails server on connect with tvos. thanks for your help @Nicola – ShujatAli Mar 25 '16 at 05:40