Inherits from NSObject
Declared in DBAccount.h

Overview

The account represents a particular user who has linked his account to your app. You can get account objects from the account manager.

Tasks

Unlinking an account

  • – unlink

    This method unlinks a user’s account from your app.

Getting the current state

  •   userId

    The user id of the account. This can be used to associate metadata with a given account.

    property
  •   linked

    Whether the account is currently linked. Note that accounts can be unlinked via the unlink method or from the Dropbox website.

    property
  •   info

    Information about the user of this account, or nil if no info is available. Account info is fetched in the background. To be notified when account info is available or updated, use addObserver:block:.

    property

Watching for changes

Properties

info

@property (nonatomic, readonly) DBAccountInfo *info
Discussion

Information about the user of this account, or nil if no info is available. Account info is fetched in the background. To be notified when account info is available or updated, use addObserver:block:.

Declared In

DBAccount.h

linked

@property (nonatomic, readonly, getter=isLinked) BOOL linked
Discussion

Whether the account is currently linked. Note that accounts can be unlinked via the unlink method or from the Dropbox website.

Declared In

DBAccount.h

userId

@property (nonatomic, readonly) NSString *userId
Discussion

The user id of the account. This can be used to associate metadata with a given account.

Declared In

DBAccount.h

Instance Methods

addObserver:block:

- (void)addObserver:(id)observer block:(DBObserver)block
Discussion

Add block as an observer of an account to get notified whenever the account’s linked or info properties change.

Declared In

DBAccount.h

removeObserver:

- (void)removeObserver:(id)observer
Discussion

Remove all blocks associated with observer by the addObserver:block: method.

Declared In

DBAccount.h

unlink

- (void)unlink
Discussion

This method unlinks a user’s account from your app.

Once an account is unlinked, the local cache is deleted. If there is a filesystem object created with this account it will stop running.

Declared In

DBAccount.h