happyfoxinc/helpstack — pull request #22 by lnbharath (2014-10-21 14:19:52+00:00)
Title: Dropbox Integration

Added support to use Dropbox files as attachments.

To test this feature,

Download and add Dropbox SDK to your app.

Download link-
https://www.dropbox.com/developers/downloads/sdks/chooser/ios/dropbox-io
s-dropins-sdk-1.2.1.zip

Create a URL scheme

Click on your project in the Project Navigator, select the Target
option on the left, choose the Info tab, expand the URL Types section
at the bottom, and press the + button.

In the URL Schemes enter db-bof6zlj9wk1ln7o
I’ve created a new Dropbox account and App ID for testing purpose.

Add the following code to the app’s AppDelegate file

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url
sourceApplication:(NSString *)source annotation:(id)annotation
{

if ([[DBChooser defaultChooser] handleOpenURL:url]) {
// This was a Chooser response and handleOpenURL automatically
ran the
// completion block
return YES;
}

return NO;
}