DBOfficialAppConnector
Objective-C
@interface DBOfficialAppConnector : NSObject
                Swift
class DBOfficialAppConnector : NSObject
                Manages returning to the official Dropbox app.
Note
This logic is for official Dropbox partners only, and should not need to be used by other third-party apps.- 
                  
                  
Full constructor.
Declaration
Objective-C
- (nonnull instancetype) initWithAppKey:(nonnull NSString *)appKey canOpenURLWrapper:(nonnull BOOL (^)(NSURL *_Nonnull))canOpenURLWrapper openURLWrapper:(nonnull void (^)(NSURL *_Nonnull))openURLWrapper;Swift
init(appKey: String, canOpenURLWrapper: @escaping (URL) -> Bool, openURLWrapper: @escaping (URL) -> Void)Parameters
appKeyThe consumer app key of the current third-party API app.
canOpenURLWrapperA wrapper around the
[UIApplication canOpenURL]method call to ensure the SDK is app-extension safe.openURLWrapperA wrapper around the [UIApplication openURL] method call to ensure the SDK is app-extension safe.
Return Value
An initialized instance.
 - 
                  
                  
Returns to the Dropbox app specified by app
Note
This logic is for official Dropbox partners only, and should not need to be used by other third-party apps.
Declaration
Objective-C
- (void)returnToDropboxApp:(nonnull DBOpenWithInfo *)openWithInfo changesPending:(BOOL)changesPending;Swift
func `return`(toDropboxApp openWithInfo: DBOpenWithInfo, changesPending: Bool)Parameters
openWithInfoInformation retrieved from a shared
UIPasteboardthat is used to return to the official Dropbox app.changesPendingWhether there are changes pending in Dropbox for the file.
 - 
                  
                  
Returns to the Dropbox app specified by app passing along the error and a dictionary of extra information.
Note
This logic is for official Dropbox partners only, and should not need to be used by other third-party apps.
Declaration
Objective-C
- (void)returnToDropboxApp:(nonnull DBOpenWithInfo *)openWithInfo changesPending:(BOOL)changesPending errorName:(nullable NSString *)errorName extras:(nullable NSDictionary *)extras;Swift
func `return`(toDropboxApp openWithInfo: DBOpenWithInfo, changesPending: Bool, errorName: String?, extras: [AnyHashable : Any]?)Parameters
openWithInfoInformation retrieved from a shared
UIPasteboardthat is used to return to the official Dropbox app.changesPendingWhether there are changes pending in Dropbox for the file.
errorNameThe error encoutered to pass back to the official Dropbox app.
extrasExtra information to pass back to the official Dropbox app.
 - 
                  
                  
Parses the url from the official Dropbox app into a
DBOpenWithInfoobject.Declaration
Objective-C
- (nullable DBOpenWithInfo *)openWithInfoFromURL:(nonnull NSURL *)url;Swift
func openWithInfo(from url: URL) -> DBOpenWithInfo?Parameters
urlThe url from the official Dropbox app used to open the SDK.
Return Value
Structured data parsed from the supplied url.
 - 
                  
                  
Determines whether an official Dropbox app is installed.
Declaration
Objective-C
- (BOOL)isRequiredDropboxAppInstalled;Swift
func isRequiredDropboxAppInstalled() -> BoolReturn Value
Whether an official Dropbox app is installed.
 - 
                  
                  
Retrieves from a shared
UIPasteboardinformation used to return to the official Dropbox app.Note
This logic is for official Dropbox partners only, and should not need to be used by other third-party apps.
Declaration
Objective-C
+ (nullable DBOpenWithInfo *)retriveOfficialDropboxAppOpenWithInfo;Swift
class func retriveOfficialDropboxAppOpenWithInfo() -> DBOpenWithInfo?Return Value
DBOpenWithInfoobject that wraps the relevant information for returning to the official Dropbox app. 
View on GitHub
        DBOfficialAppConnector Class Reference