EMTokenManager
Objective-C
@protocol EMTokenManager <NSObject>
Swift
protocol EMTokenManager : NSObjectProtocol
The manager to create and retrieve tokens.
-
Returns the names of available tokens. An empty set is returned if no token is found.
Declaration
Objective-C
- (NSSet<NSString *> *)tokenNames:(NSError **)error;Swift
func tokenNames() throws -> Set<String>Parameters
errorIf an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in
NULL.Return Value
The available token names as a set of NSString.
-
Removes an existing token.
Declaration
Objective-C
- (BOOL)removeTokenWithName:(NSString *)name error:(NSError **)error;Swift
func removeToken(withName name: String!) throwsParameters
nameThe token name.
errorIf an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in
NULL.Return Value
YESif it existed and was removed, otherwiseNO. -
Removes an existing token.
Declaration
Objective-C
- (BOOL)removeToken:(id<EMToken>)token error:(NSError **)error;Swift
func remove(_ token: (any EMToken)!) throwsParameters
tokenThe token to remove
errorIf an error occurs, upon return contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in
NULL.Return Value
YESif it existed and was removed, otherwiseNO.
EMTokenManager Protocol Reference