Sync API SDKs

Dropbox offers native SDKs for iOS, OS X and Android. This page includes instructions on how to download and set up SDKs for each platform, as well as links to SDKs provided by the community for other environments.

Before building an app using the Sync API, you'll need to create an app with the App folder or File type permission in the App Console (Full Dropbox permission is not supported with the Sync API). Visit the developer guide for more information on the different types of permissions.

iOS SDK

Xcode with the iOS development kit is required to build an iOS app using the Sync API. The Sync API requires iOS 5.0 or later.

Adding Dropbox.framework to your project

Once you've downloaded the Datastore API iOS SDK, you'll need to add all the necessary frameworks to your project.

  1. Open your project in Xcode.
  2. Navigate to where you downloaded the SDK and drag the Dropbox.framework folder into your project in Xcode.
  3. Make sure Copy items ... is selected.
  4. Press the Finish button.
  5. Ensure that you have CFNetwork.framework, Security.framework, SystemConfiguration.framework, QuartzCore.framework, libc++.dylib, and libz.dylib added to your project. To do this, select your project file in the file explorer, select your target, and select the Build Phases sub-tab. Under Link Binary with Libraries, press the + button, select CFNetwork.framework, and press Add. Repeat for Security.framework, SystemConfiguration.framework, QuartzCore.framework, libc++.dylib, and libz.dylib.

Creating a URL scheme

The SDK coordinates with the Dropbox app (if it's installed) to simplify the auth process. But in order to smoothly hand the user back to your app, you need to add a unique URL scheme that Dropbox can call. You'll need to configure your project to add one:

  1. Click on your project in the Project Navigator, choose the Info tab, expand the URL Types section at the bottom, and finally, press the + button.
  2. In the URL Schemes enter db-APP_KEY (replacing APP_KEY with the key generated when you created your app).

Example apps

If you want to see the Sync API in action, check out the Examples directory in the SDK bundle. There you can find a simple note-taking app that uses the Sync API to save notes to Dropbox and alerts you if the notes are updated. This app will also sync notes with the notes example included in the SDKs for other platforms.

More info