cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
We want to hear from you. What do you use Dropbox for?
Close

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

IOS App integration overview

Explorer | Level 4

HI,

I'm planning on integrating DropBox into my IOS (Swift) iphone app. I guess API v2 is the way to go. I don't see that the simpler "chooser" and "saver" are available for Swift. 

I want the interface to be as simple as possible for uploading, and downloading files in personal and shared folders. Do you think the Photos Watch Demo is a good place to start? Does the API require that DropBox is installed on the phone? My app uses a landscape view. Will the authentication or whatever other UI views presented with the API support a landscape view? Thanks

1 Accepted Solution

Accepted Solutions
Highlighted

Re: IOS App integration overview

Dropboxer
Dropboxer

We do have a Chooser implementation for iOS, but as you mentioned, it's not written in Swift. You may still be able to use that in a Swift project, via a "bridging header", but that hasn't been explicitly tested, so I can't promise if that would work or offer instructions for doing so.

For uploading and downloading in Swift, using API v2 via SwiftyDropbox is probably best. PhotoWatch is the official example for that, but make sure you go through the SwiftyDropbox readme as well.

Using the Dropbox API does not require the official Dropboxi OS app to also be installed.

If the official Dropbox iOS app is not installed, the app authorization flow will be handled in an SFSafariViewController inside your app, which will allow landscape mode. (The SDK doesn't have any other UI of its own; the rest of the UI is under your control.) If the official iOS Dropbox app is installed, the SDK will automatically switch to that to handle the app authorization flow, and then will switch back to your app automatically afterwards. The app authorization page in the official Dropbox iOS app does not currently support landscape orientation though.

View solution in original post

4 Replies 4
Highlighted

Re: IOS App integration overview

Dropboxer
Dropboxer

We do have a Chooser implementation for iOS, but as you mentioned, it's not written in Swift. You may still be able to use that in a Swift project, via a "bridging header", but that hasn't been explicitly tested, so I can't promise if that would work or offer instructions for doing so.

For uploading and downloading in Swift, using API v2 via SwiftyDropbox is probably best. PhotoWatch is the official example for that, but make sure you go through the SwiftyDropbox readme as well.

Using the Dropbox API does not require the official Dropboxi OS app to also be installed.

If the official Dropbox iOS app is not installed, the app authorization flow will be handled in an SFSafariViewController inside your app, which will allow landscape mode. (The SDK doesn't have any other UI of its own; the rest of the UI is under your control.) If the official iOS Dropbox app is installed, the SDK will automatically switch to that to handle the app authorization flow, and then will switch back to your app automatically afterwards. The app authorization page in the official Dropbox iOS app does not currently support landscape orientation though.

View solution in original post

Highlighted

Re: IOS App integration overview

Explorer | Level 4

Very helpful, thanks. I'm wondering if I can specify to use the SFSafariViewController for app authorization flow even if the official IOS DropBox app is installed? 

Highlighted

Re: IOS App integration overview

Dropboxer
Dropboxer

No, unfortunately the SDK doesn't offer an option to control that, but I'll pass this along as a feature request. 

Highlighted

Re: IOS App integration overview

Explorer | Level 4

Okay thanks

Polls
Do you know how to organize your files and folders?
<b>We have created a guide on folder best practice, so you can get organized now <a href="https://www.dropboxforum.com/t5/Business-Tips-tricks/Folder-structure-best-practice/m-p/428456#M39"><u>check it out here</u></a>.</b>

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?