12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- Getting Started Using the DropboxSDK for iOS:
- Requirements:
- 1. You need the 7.1 version of the iPhone SDK. The version of your Xcode should
- be at least 6.4.
- 2. You need to have registered as a Dropbox app at
- http://www.dropbox.com/developers/apps. You should have an app key and
- secret.
- Note: The SDK is designed to work with iOS versions 6.0 and above.
- Building and using the example app:
- 1. Open the project file in examples/DBRoulette/DBRoulette.xcodeproj
- 2. Fill in the values for appKey, appSecret, and root in
- DBRouletteAppDelegate.m application:didFinishLaunchingWithOptions:
- and DBRoulette-Info.plist's URL types -> Item 0 -> URL Schemes
- -> Item 0 -> db-APP_KEY.
- 3. Make sure the build is set to Simulator. This setting should be near
- the top-left corner of Xcode.
- 4. Build and Run app
- 5. Once running, make sure you can use the app to login and view photos in your
- Photos Dropbox folder without getting errors.
- If you cannot run the app without getting errors, make sure your consumer key
- and consumer token are correct. Also make sure that your app has been
- approved by Dropbox for mobile access.
- Adding DropboxSDK to your project:
- 1. Open your project in Xcode
- 2. Right-click on your project in the files tab of the left pane and
- select "Add Files to '<PROJECT_NAME>'"
- 4. Navigate to where you uncompressed the Dropbox SDK and select the
- DropboxSDK.framework subfolder
- 5. Select "Copy items into destination group's folder"
- 6. Press Add button
- 7. Ensure that you have the Security.framework and QuartzCore.framework are
- added to your project. To do this in Xcode4, 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
- Security.framework, and press Add. Repeat for QuartzCore.framework if
- necessary.
- 8. Add "dbapi-2" and "dbapi-8-emm" to the LSApplicationQueriesSchemes array in your
- application's info plist. This will allow the DropboxSDK to determine whether
- the Dropbox app and the Dropbox EMM app are installed respectively.
- 9. Build your application. At this point you should have no build failures or
- warnings
- Important Privacy Note:
- By default the DropboxSDK uses the Apple system log (NSLog) to log useful debug information.
- In some cases these logs may contain the paths and other private user data. Ensure
- that these logs are treated with the same level of secrecy as any other piece
- of user data. Do not send these logs to 3rd parties you do not trust. In the
- release build of your app to disable logging use the DBLogSetLevel function in DBLog.h.
- Setting the level to DBLogLevelFatal will stop all log messages.
-
- Using the Dropbox SDK:
- To learn more about using the Dropbox SDK, there is a tutorial on the Developers
- page at https://www.dropbox.com/developers/core/start/ios
|