UPDATE: Setting the Dropbox SDK to use HTTP instead of HTTPS cures this problem on an iPhone 3G. I haven't used the SDK on iPhone 4 or iPad yet so I'm not sure of the result.
Playing with the Dropbox SDK on iOS yields these results: in simulator, I can properly link my account using the provided login form class. Changing the build setting to device, I get an error alertView triggered by this method in DBLoginController.m
- (void)restClient:(DBRestClient*)client loginFailedWithError:(NSError*)error {
[self setWorking:NO];
NSString* message;
if ([error.domain isEqual:NSURLErrorDomain]) {
message = @"There was an error connecting to Dropbox.";
} else {
//...
The login form is displayed like so, as referenced in the included sample project:
-(void)settingsPressed {
if (![[DBSession sharedSession] isLinked]) {
DBLoginController* controller = [[DBLoginController new] autorelease];
controller.delegate = self;
[controller presentFromController:self];
} else {
[[DBSession sharedSession] unlink];
[[[[UIAlertView alloc]
initWithTitle:@"Account Unlinked!" message:@"Your dropbox account has been unlinked"
delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]
autorelease]
show];
[self updateButtons];
}
}
I'm not sure what to make of this. Apple docs suggest that NSURLErrorDomain is defined as NSURL loading system errors. Can anyone shed light on that?