title: Unable to Generate Link error when using Dropbox Chooser SDK for iOS
body: <p>In my app, I've already integrated Dropbox Sync SDK. So when the Dropbox Chooser SDK for iOS comes in, I give it a try.</p>
  
  <p>My question is, when I tested on my actual device, it says </p>
  
  <blockquote>
    <p>"Unable to Generate Link. Sorry, an error occurred. Please try again later."</p>
  </blockquote>
  
  <p>// Note: They say "You may have a project that requires multiple app keys because it also uses the Core or Sync API. In this case, you'll need to explicitly initialize your own instance of the Chooser with the right app key by using the -initWithAppKey: method."</p>
  
  <p><strong>Update:</strong>
  Because I already has the same URL scheme for the Sync API, so what I did was to initialize another instance of Chooser with <code>-initWithAppkey:</code> method in both -<code>application:openURL:sourceApplication:annotation:</code> in my <strong>AppDelegate</strong> </p>
  
  <pre><code>-(BOOL)  application:(UIApplication *)application
               openURL:(NSURL *)url
     sourceApplication:(NSString *)sourceApplication
            annotation:(id)annotation
  {
    // instantiate a new DBChooser instance with Chooser Key
    // .. make sure it should not include 'db-' prefix
    DBChooser *chooser = [[DBChooser alloc] initWithAppKey:@"my-chooser-key"];
    if ([chooser handleOpenURL:url]) {
        // This was a Chooser response and handleOpenURL automatically ran the
        // completion block
        return YES;
    }
  
    return NO;
  }
  </code></pre>
  
  <p>... and my top most  view controller.</p>
  
  <pre><code>- (void)didPressChoose
  {
      // .. make sure it should not include 'db-' prefix
      DBChooser *chooser = [[DBChooser alloc] initWithAppKey:@"my-dropbox-key"];
      [chooser openChooserForLinkType:DBChooserLinkTypeDirect
                                  fromViewController:self
                                          completion:^(NSArray *results)
      {
         if ([results count]) {
  
             // Process results from Chooser
             _result = results[0];
             NSLog(@"%@", _result.link);
         } else {
  
             // User canceled the action
         }
      }];
  }
  </code></pre>