AI-generated Key Takeaways
-
GMTCAuthTokenFetchCompletionHandler
is a completion block triggered when an authorization token is ready, providing the token or an error. -
The
GMTCAuthTokenFetchCompletionHandler
type definition can take an authorization token or an error as parameters. -
GMTCFleetEngineIDString
defines an ID field of type String, used for data sent to Fleet Engine, which will not be modified by the SDK. -
String-type fields passed to Fleet Engine via
GMTCFleetEngineIDString
must adhere to specific UTF-8, length, and character restrictions to prevent request failures.
Type-Definitions
The following type definitions are available globally.
-
Completion block called when an authorization token is available.
Declaration
Swift
typealias GMTCAuthTokenFetchCompletionHandler = (String?, (any Error)?) -> Void
Objective-C
typedef void (^GMTCAuthTokenFetchCompletionHandler)(NSString *_Nullable, NSError *_Nullable)
Parameters
authToken
The authorization token. Will be null if an error occurs.
error
The error that occurred if any.
-
Specifies an ID field that is of type String.
The SDK receives string data from other APIs and passes that data unmodified to Fleet Engine. However, Fleet Engine requires that some string-typed data conform to specific rules. Data passed through the SDK to Fleet Engine can result in request failure if the data format does not conform to Fleet Engine rules. To prevent request failures to Fleet Engine, use this typedef to identify which fields from incoming calls must follow the following formatting rules:
- The string must be a valid UTF-8 string in UTF normalized form C (see http://www.unicode.org/reports/tr15/).
- The string must be no longer than 64 characters in length.
- The string must not contain the characters ‘/’, ‘:’, ‘?’, ‘,’, or ‘#’.
You are responsible for ensuring that when your client makes calls to Fleet Engine SDKs, ID strings conform to the restrictions above. The SDK itself will pass the input values unmodified to the backend.
Declaration
Objective-C
typedef NSString GMTCFleetEngineIDString