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

Tibor H.
New member | Level 1

I would like to second(or third) the request for tvOS support.

With the new Apple TV, cloud solutions will be very important and I know a lot of my users do not want to or can rely on iCloud.

 

Greg-DB
Dropbox Staff

Thanks for the feedback! At this point, we're recommending developers use the flow I described earlier, especially since this is already possible with the existing API. 

It's also the same as how connecting providers is already done on the existing Apple TV product:

></p>
<p> </p>

Tibor H.
New member | Level 1

Is there documentation for this available? I cannot seem to find it.

Greg-DB
Dropbox Staff

On the Dropbox side, there's no special documentation since this would just utilize the normal OAuth flow, documented here:

https://www.dropbox.com/developers/core/docs#oa2-authorize

https://www.dropbox.com/developers/reference/oauthguide

I don't know if Apple offers any guidance or documentation on the Apple TV side of things of course though.

Tibor H.
New member | Level 1

So, that seems to work for now. However, I do get this warning from the linker:

ld: warning: URGENT: building for tvOS simulator, but linking in object file (.../DropboxSDK.framework/DropboxSDK) built for (unknown). Note: This will be an error in the future.

Any chance you can build a framework for tvOS?

Steve M.
Dropbox Staff

The code for the iOS SDK is part of the downloadable zip file. I assume you can just add the code directly and compile however you're compiling the rest of your app. Is that not true?

Tibor H.
New member | Level 1

Doh, I was not aware that the Dropbox SDK source was available (didn't even check).

Now, it seems that when I download a file via dropbox on tvOS, it tries to save it in a Dropbox temp folder. Just as a heads-up, I haven't dug into the source yet but it seems that Dropbox temp folder is in the documents folder. tvOS has no documents folder and the download to the Dropbox temp folder fails.

So with the source available, I can probably fix that easily but you might want to look into it for other devs...  

Steve M.
Dropbox Staff

I'm not sure what you mean... could you share the code you're using to download the file? I believe you can choose whatever local path you want?

Tibor H.
New member | Level 1

Oh, I use this:

[self.restClient loadFile:path intoPath:local];

With the local path being in the cache folder and available.

But the error happens when DBRestClient (or what class is behind there) finished the download and tries to move it to the 'local' path ("data" in this example):

[ERROR] DBRequest#connectionDidFinishLoading: error moving temp file to desired location: “6B515164-57F8-4152-992E-486CA8FB0EFE-5029-000054C21A6EFDD9” couldn’t be moved to “data” because either the former doesn't exist, or the folder containing the latter doesn't exist.

Tibor H.
New member | Level 1

Never mind, my mistake.

Dropbox uses the tmp directory, NSTemporaryDirectory()

I didn't. Thanks again. Works fine.

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?