DBTransportDefaultConfig
Objective-C
@interface DBTransportDefaultConfig : DBTransportBaseConfig
Swift
class DBTransportDefaultConfig : DBTransportBaseConfig
Configuration class for DBTransportDefaultClient
.
-
A serial delegate queue used for executing blocks of code that touch state shared across threads (mainly the request handlers storage).
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSOperationQueue *delegateQueue;
Swift
var delegateQueue: OperationQueue? { get }
-
If set to true, all network requests are made on foreground sessions (by default, most upload/download operations are performed with a background session). This is appropriate for use cases where file upload / download operations will be quick, and immediate response is preferable. Otherwise, for background sessions, uploads/downloads will essentially never time out, if network connection is lost after the request has begun.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL forceForegroundSession;
Swift
var forceForegroundSession: Bool { get }
-
The identifier for the shared container into which files in background URL sessions should be downloaded. This needs to be set when downloading via an app extension.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *sharedContainerIdentifier;
Swift
var sharedContainerIdentifier: String? { get }
-
Convenience constructor.
Declaration
Objective-C
- (nonnull instancetype)initWithAppKey:(nonnull NSString *)appKey;
Swift
init(appKey: String)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
Return Value
An initialized instance.
-
Convenience constructor.
Appropriate for apps that want to query endpoints with “app auth” authentication type.
Declaration
Objective-C
- (nonnull instancetype)initWithAppKey:(nonnull NSString *)appKey appSecret:(nonnull NSString *)appSecret;
Swift
init(appKey: String, appSecret: String)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
appSecret
The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
Return Value
An initialized instance.
-
Convenience constructor.
Appropriate for apps that want to query endpoints with “app auth” authentication type.
Declaration
Objective-C
- (nonnull instancetype)initWithAppKey:(nonnull NSString *)appKey appSecret:(nonnull NSString *)appSecret delegateQueue: (nullable NSOperationQueue *)delegateQueue;
Swift
init(appKey: String, appSecret: String, delegateQueue: OperationQueue?)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
appSecret
The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
delegateQueue
A serial delegate queue used for executing blocks of code that touch state shared across threads (mainly the request handlers storage).
Return Value
An initialized instance.
-
Convenience constructor.
Appropriate for use cases where file upload / download operations will be quick, and immediate response is preferable. Otherwise, for background sessions, uploads/downloads will essentially never time out, if network connection is lost after the request has begun.
Declaration
Objective-C
- (nonnull instancetype)initWithAppKey:(nonnull NSString *)appKey forceForegroundSession:(BOOL)forceForegroundSession;
Swift
init(appKey: String, forceForegroundSession: Bool)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
forceForegroundSession
If set to true, all network requests are made on foreground sessions (by default, most upload/download operations are performed with a background session).
Return Value
An initialized instance.
-
Convenience constructor.
Declaration
Objective-C
- (nonnull instancetype)initWithAppKey:(nonnull NSString *)appKey appSecret:(nullable NSString *)appSecret userAgent:(nullable NSString *)userAgent delegateQueue: (nullable NSOperationQueue *)delegateQueue forceForegroundSession:(BOOL)forceForegroundSession;
Swift
init(appKey: String, appSecret: String?, userAgent: String?, delegateQueue: OperationQueue?, forceForegroundSession: Bool)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
appSecret
The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
userAgent
The user agent associated with all networking requests. Used for server logging.
delegateQueue
A serial delegate queue used for executing blocks of code that touch state shared across threads (mainly the request handlers storage).
forceForegroundSession
If set to true, all network requests are made on foreground sessions (by default, most upload/download operations are performed with a background session).
Return Value
An initialized instance.
-
Convenience constructor.
Declaration
Objective-C
- (nonnull instancetype)initWithAppKey:(nonnull NSString *)appKey appSecret:(nullable NSString *)appSecret userAgent:(nullable NSString *)userAgent asMemberId:(nullable NSString *)asMemberId delegateQueue: (nullable NSOperationQueue *)delegateQueue forceForegroundSession:(BOOL)forceForegroundSession;
Swift
init(appKey: String, appSecret: String?, userAgent: String?, asMemberId: String?, delegateQueue: OperationQueue?, forceForegroundSession: Bool)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
appSecret
The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
userAgent
The user agent associated with all networking requests. Used for server logging.
delegateQueue
A serial delegate queue used for executing blocks of code that touch state shared across threads (mainly the request handlers storage).
forceForegroundSession
If set to true, all network requests are made on foreground sessions (by default, most upload/download operations are performed with a background session).
asMemberId
An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.
Return Value
An initialized instance.
-
-initWithAppKey:
appSecret: userAgent: asMemberId: delegateQueue: forceForegroundSession: sharedContainerIdentifier: Convenience constructor.
Declaration
Objective-C
- (nonnull instancetype) initWithAppKey:(nonnull NSString *)appKey appSecret:(nullable NSString *)appSecret userAgent:(nullable NSString *)userAgent asMemberId:(nullable NSString *)asMemberId delegateQueue:(nullable NSOperationQueue *)delegateQueue forceForegroundSession:(BOOL)forceForegroundSession sharedContainerIdentifier:(nullable NSString *)sharedContainerIdentifier;
Swift
init(appKey: String, appSecret: String?, userAgent: String?, asMemberId: String?, delegateQueue: OperationQueue?, forceForegroundSession: Bool, sharedContainerIdentifier: String?)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
appSecret
The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
userAgent
The user agent associated with all networking requests. Used for server logging.
delegateQueue
A serial delegate queue used for executing blocks of code that touch state shared across threads (mainly the request handlers storage).
forceForegroundSession
If set to true, all network requests are made on foreground sessions (by default, most upload/download operations are performed with a background session).
asMemberId
An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.
sharedContainerIdentifier
The identifier for the shared container into which files in background URL sessions should be downloaded. This needs to be set when downloading via an app extension.
Return Value
An initialized instance.
-
-initWithAppKey:
appSecret: userAgent: asMemberId: additionalHeaders: delegateQueue: forceForegroundSession: sharedContainerIdentifier: Full constructor.
Declaration
Objective-C
- (nonnull instancetype) initWithAppKey:(nonnull NSString *)appKey appSecret:(nullable NSString *)appSecret userAgent:(nullable NSString *)userAgent asMemberId:(nullable NSString *)asMemberId additionalHeaders:(nullable NSDictionary<NSString *, NSString *> *) additionalHeaders delegateQueue:(nullable NSOperationQueue *)delegateQueue forceForegroundSession:(BOOL)forceForegroundSession sharedContainerIdentifier:(nullable NSString *)sharedContainerIdentifier;
Swift
init(appKey: String, appSecret: String?, userAgent: String?, asMemberId: String?, additionalHeaders: [String : String]?, delegateQueue: OperationQueue?, forceForegroundSession: Bool, sharedContainerIdentifier: String?)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
appSecret
The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
userAgent
The user agent associated with all networking requests. Used for server logging.
delegateQueue
A serial delegate queue used for executing blocks of code that touch state shared across threads (mainly the request handlers storage).
forceForegroundSession
If set to true, all network requests are made on foreground sessions (by default, most upload/download operations are performed with a background session).
asMemberId
An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.
sharedContainerIdentifier
The identifier for the shared container into which files in background URL sessions should be downloaded. This needs to be set when downloading via an app extension.
additionalHeaders
Additional HTTP headers to be injected into each client request.
Return Value
An initialized instance.
-
-initWithAppKey:
appSecret: hostnameConfig: userAgent: asMemberId: additionalHeaders: delegateQueue: forceForegroundSession: sharedContainerIdentifier: Full constructor, with debug hostname override.
Declaration
Objective-C
- (nonnull instancetype) initWithAppKey:(nonnull NSString *)appKey appSecret:(nullable NSString *)appSecret hostnameConfig: (nullable DBTransportBaseHostnameConfig *)hostnameConfig userAgent:(nullable NSString *)userAgent asMemberId:(nullable NSString *)asMemberId additionalHeaders:(nullable NSDictionary<NSString *, NSString *> *) additionalHeaders delegateQueue:(nullable NSOperationQueue *)delegateQueue forceForegroundSession:(BOOL)forceForegroundSession sharedContainerIdentifier:(nullable NSString *)sharedContainerIdentifier;
Swift
init(appKey: String, appSecret: String?, hostnameConfig: DBTransportBaseHostnameConfig?, userAgent: String?, asMemberId: String?, additionalHeaders: [String : String]?, delegateQueue: OperationQueue?, forceForegroundSession: Bool, sharedContainerIdentifier: String?)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
appSecret
The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
hostnameConfig
A custom hostname to use for networking requests. Only useful for debugging purposes.
userAgent
The user agent associated with all networking requests. Used for server logging.
delegateQueue
A serial delegate queue used for executing blocks of code that touch state shared across threads (mainly the request handlers storage).
forceForegroundSession
If set to true, all network requests are made on foreground sessions (by default, most upload/download operations are performed with a background session).
asMemberId
An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.
sharedContainerIdentifier
The identifier for the shared container into which files in background URL sessions should be downloaded. This needs to be set when downloading via an app extension.
additionalHeaders
Additional HTTP headers to be injected into each client request.
Return Value
An initialized instance.
-
-initWithAppKey:
appSecret: hostnameConfig: redirectURL: userAgent: asMemberId: pathRoot: additionalHeaders: delegateQueue: forceForegroundSession: sharedContainerIdentifier: Full constructor, with debug hostname and redirectURL override.
Declaration
Objective-C
- (nonnull instancetype) initWithAppKey:(nonnull NSString *)appKey appSecret:(nullable NSString *)appSecret hostnameConfig: (nullable DBTransportBaseHostnameConfig *)hostnameConfig redirectURL:(nullable NSString *)redirectURL userAgent:(nullable NSString *)userAgent asMemberId:(nullable NSString *)asMemberId pathRoot:(nullable DBCOMMONPathRoot *)pathRoot additionalHeaders:(nullable NSDictionary<NSString *, NSString *> *) additionalHeaders delegateQueue:(nullable NSOperationQueue *)delegateQueue forceForegroundSession:(BOOL)forceForegroundSession sharedContainerIdentifier:(nullable NSString *)sharedContainerIdentifier;
Swift
init(appKey: String, appSecret: String?, hostnameConfig: DBTransportBaseHostnameConfig?, redirectURL: String?, userAgent: String?, asMemberId: String?, pathRoot: DBCOMMONPathRoot?, additionalHeaders: [String : String]?, delegateQueue: OperationQueue?, forceForegroundSession: Bool, sharedContainerIdentifier: String?)
Parameters
appKey
The consumer app key associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
appSecret
The consumer app secret associated with the app that is integrating with the Dropbox API. Here, app key is used for querying endpoints that have “app auth” authentication type.
hostnameConfig
A custom hostname to use for networking requests. Only useful for debugging purposes.
userAgent
The user agent associated with all networking requests. Used for server logging.
delegateQueue
A serial delegate queue used for executing blocks of code that touch state shared across threads (mainly the request handlers storage).
forceForegroundSession
If set to true, all network requests are made on foreground sessions (by default, most upload/download operations are performed with a background session).
asMemberId
An additional authentication header field used when a team app with the appropriate permissions “performs” user API actions on behalf of a team member.
pathRoot
The value of path root object which will be used as Dropbox-Api-Path-Root header.
sharedContainerIdentifier
The identifier for the shared container into which files in background URL sessions should be downloaded. This needs to be set when downloading via an app extension.
additionalHeaders
Additional HTTP headers to be injected into each client request.
Return Value
An initialized instance.