First of all - you have to create REST client only after session became linked - this will ensure you that DBRestClient will be connected to real session.
Second - problems can be if there are a Dropbox application installed on device with your application. In this case your application will push up the authentification to DB application.
And third - your implementation of - (id) init for your class is not a singleton. Singleton is a pattern when your object lives only in one common object and no recreation can be done. I Objective C we have to look after retain counts as well (in no-Arc code shode be overridden memory management methods). But in anyway your init method (often called shared instance) should look like that:
static Singleton * sharedInstance= nil;
+(Singleton *) sharedInstance
{
static dispatch_once_t once_token = 0;
dispatch_once(&once_token, ^
{
sharedInstance = [Singleton new];
});
return sharedInstance ;
}
Hope this will help you with DB integration