Method guide
YXLSdk class
The authorization class. All methods of the YXLSdk class can only be used after activating SDK Yandex ID.
Methods
-
Activate SDK Yandex ID:
- (BOOL)activateWithAppId:(NSString *)appId error:(NSError *__autoreleasing *)error -
Check the
NSUserActivityobject for a token:- (BOOL)processUserActivity:(NSUserActivity *)userActivity -
Check the
NSURLobject for authorization information:- (BOOL)handleOpenURL:(NSURL *)url sourceApplication:(nullable NSString *)sourceApplication -
Add an observer:
- (void)addObserver:(id<YXLObserver>)observer NS_SWIFT_NAME(add(observer:)) -
Remove an observer:
- (void)removeObserver:(id<YXLObserver>)observer NS_SWIFT_NAME(remove(observer:)) -
Start the authorization process (a Yandex app or the browser will open):
- (void)authorize -
Delete all saved tokens (use this method when you need to request a new set of tokens):
- (void)logout
Properties
-
Return a string with the SDK Yandex ID version:
@property (class, readonly) NSString *sdkVersion
YXLObserver class
The class dealing with authorization events.
Methods
-
This method is called upon successful authorization. The
resultparameter contains fields with the tokens:- (void)loginDidFinishWithResult:(id<YXLLoginResult>)result -
This method is called when an error occurs during authorization. The
errorparameter contains an error code:- (void)loginDidFinishWithError:(NSError *)error
YXLLoginResult class
The class that SDK Yandex ID returns after a successful authorization.
Properties
-
The token used in parameters of requests to Yandex services:
(nonatomic, copy, readonly) NSString *token -
(nonatomic, copy, readonly) NSString *jwt