FBSDKErrorRecoveryAttempting

A formal protocol very similar to the informal protocol NSErrorRecoveryAttempting

Extends Protocol:NSObject
Declared in:FBSDKErrorRecoveryAttempting.h
Métodos da instância
attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:

Attempt the recovery

ParâmetroDescrição
error

The error

recoveryOptionIndex

The selected option index

delegate

The delegate

didRecoverSelector

The callback selector, see discussion.

contextInfo

Context info to pass back to callback selector, see discussion.

- (void)
attemptRecoveryFromError: (NSError *)error
optionIndex: (NSUInteger)recoveryOptionIndex
delegate: (id)delegate
didRecoverSelector: (SEL)didRecoverSelector
contextInfo: (void*)contextInfo;
Discussion:

Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise.

Constantes
FBSDKErrorArgumentCollectionKey
FBSDK_EXTER N NSString *const FBSDKErrorArgumentCollectionKey;
Discussion:

If the invalid argument is a collection, the collection can be found with this key and the individual invalid item can be found with FBSDKErrorArgumentValueKey.

FBSDKErrorArgumentNameKey
FBSDK_EXTER N NSString *const FBSDKErrorArgumentNameKey;
FBSDKErrorArgumentValueKey
FBSDK_EXTER N NSString *const FBSDKErrorArgumentValueKey;
FBSDKErrorDeveloperMessageKey
FBSDK_EXTER N NSString *const FBSDKErrorDeveloperMessageKey;
Discussion:

The developer message will not be localized and is not intended to be presented within the app.

FBSDKErrorDomain
FBSDK_EXTER N NSString *const FBSDKErrorDomain;
Discussion:

Error codes from the SDK in the range 0-99 are reserved for this domain.

FBSDKErrorLocalizedDescriptionKey
FBSDK_EXTER N NSString *const FBSDKErrorLocalizedDescriptionKey;
FBSDKErrorLocalizedTitleKey
FBSDK_EXTER N NSString *const FBSDKErrorLocalizedTitleKey;
FBSDKGraphRequestErrorCategoryKey
FBSDK_EXTER N NSString *const FBSDKGraphRequestErrorCategoryKey;
Discussion:

See FBSDKGraphErrorRecoveryProcessor and [FBSDKGraphRequest disableErrorRecovery].

Typedefs
NS_ENUM

Indicates an app switch to the browser (typically for a dialog) failed.

typedef NS_ENUM(NSInteger, FBSDKErrorCode) {
/*!
*/
FBSDKReservedErrorCode = 0, /*!
*/
FBSDKEncryptionErrorCode, /*!
*/
FBSDKInvalidArgumentErrorCode, /*!
*/
FBSDKUnknownErrorCode, /*!
*/
FBSDKNetworkErrorCode, /*!
*/
FBSDKAppEventsFlushErrorCode, /*!
*/
FBSDKGraphRequestNonTextMimeTypeReturnedErrorCode, /*!
*/
FBSDKGraphRequestProtocolMismatchErrorCode, /*!
*/
FBSDKGraphRequestGraphAPIErrorCode, /*!
*/
FBSDKDialogUnavailableErrorCode, /*!
*/
FBSDKAccessTokenRequiredErrorCode, /*!
*/
FBSDKAppVersionUnsupportedErrorCode, /*!
*/
FBSDKBrowserUnavailableErrorCode, /*!
*/
FBSDKBrowswerUnavailableErrorCode __attribute__ ((deprecated("use FBSDKBrowserUnavailableErrorCode instead"))) =
FBSDKBrowserUnavailableErrorCode,
};
Discussion:

This error may signify that the configuration for the dialogs has not yet been downloaded from the server or that the dialog is unavailable. Subsequent attempts to use the dialog may succeed as the configuration is loaded.

NS_ENUM

Describes the category of Facebook error. See FBSDKGraphRequestErrorCategoryKey.

typedef NS_ENUM(NSUInteger, FBSDKGraphRequestErrorCategory) {
/*! The default error category that is not known to be recoverable. Check `FBSDKLocalizedErrorDescriptionKey` for a user facing message.
*/
FBSDKGraphRequestErrorCategoryOther = 0, /*! Indicates the error is temporary (such as server throttling). While a recoveryAttempter will be provided with the error instance, the attempt is guaranteed to succeed so you can simply retry the operation if you do not want to present an alert.
*/
FBSDKGraphRequestErrorCategoryTransient = 1, /*! Indicates the error can be recovered (such as requiring a login). A recoveryAttempter will be provided with the error instance that can take UI action.
*/
FBSDKGraphRequestErrorCategoryRecoverable = 2
};
ConstanteDescrição
FBSDKGraphRequestErrorCategoryOther

The default error category that is not known to be recoverable. Check FBSDKLocalizedErrorDescriptionKey for a user facing message.

FBSDKGraphRequestErrorCategoryTransient

Indicates the error is temporary (such as server throttling). While a recoveryAttempter will be provided with the error instance, the attempt is guaranteed to succeed so you can simply retry the operation if you do not want to present an alert.

FBSDKGraphRequestErrorCategoryRecoverable

Indicates the error can be recovered (such as requiring a login). A recoveryAttempter will be provided with the error instance that can take UI action.

Discussion:

FBSDKGraphRequestErrorCategory)

NS_ENUM(NSInteger, FBSDKErrorCode)

Indicates an app switch to the browser (typically for a dialog) failed.

typedef NS_ENUM(NSInteger, FBSDKErrorCode) {
/*!
*/
FBSDKReservedErrorCode = 0, /*!
*/
FBSDKEncryptionErrorCode, /*!
*/
FBSDKInvalidArgumentErrorCode, /*!
*/
FBSDKUnknownErrorCode, /*!
*/
FBSDKNetworkErrorCode, /*!
*/
FBSDKAppEventsFlushErrorCode, /*!
*/
FBSDKGraphRequestNonTextMimeTypeReturnedErrorCode, /*!
*/
FBSDKGraphRequestProtocolMismatchErrorCode, /*!
*/
FBSDKGraphRequestGraphAPIErrorCode, /*!
*/
FBSDKDialogUnavailableErrorCode, /*!
*/
FBSDKAccessTokenRequiredErrorCode, /*!
*/
FBSDKAppVersionUnsupportedErrorCode, /*!
*/
FBSDKBrowserUnavailableErrorCode, /*!
*/
FBSDKBrowswerUnavailableErrorCode __attribute__ ((deprecated("use FBSDKBrowserUnavailableErrorCode instead"))) =
FBSDKBrowserUnavailableErrorCode,
};
Discussion:

This error may signify that the configuration for the dialogs has not yet been downloaded from the server or that the dialog is unavailable. Subsequent attempts to use the dialog may succeed as the configuration is loaded.

NS_ENUM(NSUInteger,

Describes the category of Facebook error. See FBSDKGraphRequestErrorCategoryKey.

typedef NS_ENUM(NSUInteger, FBSDKGraphRequestErrorCategory) {
/*! The default error category that is not known to be recoverable. Check `FBSDKLocalizedErrorDescriptionKey` for a user facing message.
*/
FBSDKGraphRequestErrorCategoryOther = 0, /*! Indicates the error is temporary (such as server throttling). While a recoveryAttempter will be provided with the error instance, the attempt is guaranteed to succeed so you can simply retry the operation if you do not want to present an alert.
*/
FBSDKGraphRequestErrorCategoryTransient = 1, /*! Indicates the error can be recovered (such as requiring a login). A recoveryAttempter will be provided with the error instance that can take UI action.
*/
FBSDKGraphRequestErrorCategoryRecoverable = 2
};
ConstanteDescrição
FBSDKGraphRequestErrorCategoryOther

The default error category that is not known to be recoverable. Check FBSDKLocalizedErrorDescriptionKey for a user facing message.

FBSDKGraphRequestErrorCategoryTransient

Indicates the error is temporary (such as server throttling). While a recoveryAttempter will be provided with the error instance, the attempt is guaranteed to succeed so you can simply retry the operation if you do not want to present an alert.

FBSDKGraphRequestErrorCategoryRecoverable

Indicates the error can be recovered (such as requiring a login). A recoveryAttempter will be provided with the error instance that can take UI action.

Discussion:

FBSDKGraphRequestErrorCategory)