Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS Dropbox API sync, keeps linking account
    primarykey
    data
    text
    <p>i want to make my app "dropboxable". So i looked up how to implement the dropbox API correctly. It is a simple txt-File that i want to sync and load in the background. No complex filesystems or whatever. With one simple BarButton i want that the user can connect (the first time) to dropbox and then just sync by pressing the same button. So the first it should link the account to the DBAccountManager and any other time it should just up- and download my files in the background. Here is my Code so far:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; DBAccountManager *accountManager = [[DBAccountManager alloc] initWithAppKey:DB_KEY secret:DB_SECRET]; [DBAccountManager setSharedManager:accountManager]; self.dbManager = accountManager; } - (void)dropboxButtonPressed:(id)sender { DBAccount *account = self.dbManager.linkedAccount; if (account.linked) { NSLog(@"Already linked!"); } else { NSLog(@"Not linked"); [[DBAccountManager sharedManager] linkFromController:self]; } } </code></pre> <p>It is a really simple solution (i'm a beginner) so the BarButton calls the dropboxButtonPressed method. Oh and i have added a <code>@property (nonatomic, strong) DBAccountManager *dbManager;</code>.</p> <p>So instead of using the already-linked-path of the if-statement it keeps asking me if i would like to connect with an DropBox Account. </p> <p>I already downloaded the example projects from DropBox, but as i said i am a beginner and i want it as simple as possible.</p> <p>Thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload