README 2.8 KB

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