Authentication to dropbox on tvOS

怎甘沉沦 提交于 2019-12-23 07:51:28

问题


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


回答1:


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.



来源:https://stackoverflow.com/questions/35577203/authentication-to-dropbox-on-tvos

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!