A formal protocol very similar to the informal protocol NSErrorRecoveryAttempting
Extends Protocol: | NSObject |
Declared in: | FBSDKErrorRecoveryAttempting.h |
attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:
Attempt the recovery
Parameter | Description |
---|---|
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; |
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.
FBSDKErrorRecoveryAttempting.h
FBSDKErrorArgumentCollectionKey
FBSDK_EXTER N NSString *const FBSDKErrorArgumentCollectionKey;
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.
FBSDKErrorRecoveryAttempting.h
FBSDKErrorArgumentNameKey
FBSDK_EXTER N NSString *const FBSDKErrorArgumentNameKey;
FBSDKErrorRecoveryAttempting.h
FBSDKErrorArgumentValueKey
FBSDK_EXTER N NSString *const FBSDKErrorArgumentValueKey;
FBSDKErrorRecoveryAttempting.h
FBSDKErrorDeveloperMessageKey
FBSDK_EXTER N NSString *const FBSDKErrorDeveloperMessageKey;
The developer message will not be localized and is not intended to be presented within the app.
FBSDKErrorRecoveryAttempting.h
FBSDKErrorDomain
FBSDK_EXTER N NSString *const FBSDKErrorDomain;
Error codes from the SDK in the range 0-99 are reserved for this domain.
FBSDKErrorRecoveryAttempting.h
FBSDKErrorLocalizedDescriptionKey
FBSDK_EXTER N NSString *const FBSDKErrorLocalizedDescriptionKey;
FBSDKErrorRecoveryAttempting.h
FBSDKErrorLocalizedTitleKey
FBSDK_EXTER N NSString *const FBSDKErrorLocalizedTitleKey;
FBSDKErrorRecoveryAttempting.h
FBSDKGraphRequestErrorCategoryKey
FBSDK_EXTER N NSString *const FBSDKGraphRequestErrorCategoryKey;
See FBSDKGraphErrorRecoveryProcessor
and [FBSDKGraphRequest disableErrorRecovery]
.
FBSDKErrorRecoveryAttempting.h
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, };
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.
FBSDKErrorRecoveryAttempting.h
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 };
Constant | Description |
---|---|
FBSDKGraphRequestErrorCategoryOther | The default error category that is not known to be recoverable. Check |
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. |
FBSDKGraphRequestErrorCategory)
FBSDKErrorRecoveryAttempting.h
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, };
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.
FBSDKErrorRecoveryAttempting.h
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 };
Constant | Description |
---|---|
FBSDKGraphRequestErrorCategoryOther | The default error category that is not known to be recoverable. Check |
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. |
FBSDKGraphRequestErrorCategory)
FBSDKErrorRecoveryAttempting.h