Type Definitions
The following type definitions are available globally.
-
Callback to trigger when fetch resource success.
Declaration
Objective-C
typedef void (^SCSDKUserDataSuccessCompletion)(SCSDKUserData *_Nullable, NSError *_Nullable)Swift
typealias SCSDKUserDataSuccessCompletion = (SCSDKUserData?, Error?) -> VoidParameters
userDataSCSDKUserData object that contains fetched user data
partialErrorNSError containing any errors in the case of a partial success response
-
Callback to trigger when fetch resource failed.
Declaration
Objective-C
typedef void (^SCSDKUserDataFailureCompletion)(NSError *_Nullable, BOOL)Swift
typealias SCSDKUserDataFailureCompletion = (Error?, Bool) -> VoidParameters
errorError responsible for user data fetching failure
isUserLoggedOutSet to YES if the connection between 3PA and Snapchat is broken or user is not logged in to 3PA using Snapchat. Set to NO if other errors occur while fetching data from Snapchat
-
The completion handler to when getting a refreshed access token is complete. The access token returned, if present, is valid.
Declaration
Objective-C
typedef void (^SCOAuth2RefreshAccessTokenCompletionBlock)(NSString *_Nullable, NSError *_Nullable)Swift
typealias SCOAuth2RefreshAccessTokenCompletionBlock = (String?, Error?) -> VoidParameters
accessTokenRefreshed access token
errorError returned in case of a failure refreshing the access token.
-
The completion handler which SCFetchCodeVerifierBlock must invoke to report its result, either a code verifier or an error.
Declaration
Objective-C
typedef void (^SCFetchCodeVerifierCompletionBlock)(NSString *_Nullable, NSError *_Nullable)Swift
typealias SCFetchCodeVerifierCompletionBlock = (String?, Error?) -> VoidParameters
codeVerifierThe code verifier
errorThe error returned when the code verifier could not be fetched
-
A block which uses the state to fetch a code verifier and communicates this result via the completion block.
Declaration
Objective-C
typedef void (^SCFetchCodeVerifierBlock)( NSString *_Nonnull, SCFetchCodeVerifierCompletionBlock _Nonnull)Swift
typealias SCFetchCodeVerifierBlock = (String, @escaping SCFetchCodeVerifierCompletionBlock) -> VoidParameters
stateThe oAuth2 state which is needed to fetch the code verifier
completionBlockA block to be used to communicate the result of fetching the code verifier, whether it is the code verifier or an error.
-
Callback triggered when OAuth Authorization for Firebase Authentication is complete.
Declaration
Objective-C
typedef void (^SCFirebaseAuthCompletionBlock)(NSString *_Nullable, NSError *_Nullable)Swift
typealias SCFirebaseAuthCompletionBlock = (String?, Error?) -> VoidParameters
customTokenthat can be used to authentication with Firebase
errorindicating that something went wrong