SIDLogin
@interface SIDLogin : NSObject
SIDLogin
-
Undocumented
Declaration
Objective-C
@property NSString *userFields
-
Undocumented
Declaration
Objective-C
@property NSMutableDictionary *loginProviders
-
Returns the singleton object.
Declaration
Objective-C
+ (instancetype)sharedInstance;
-
Sets the default user profile fields to be retrieved.
Declaration
Objective-C
+ (void)setUserFields:(NSString *)fields;
Parameters
fields
The user profile fields.
-
Registers a login provider.
Declaration
Objective-C
+ (void)registerLoginProvider:(NSString *)provider manager:(NSObject<SIDProvider> *)manager;
Parameters
provider
Can be any of “facebook”, “google”, “linkedin” or “twitter”.
manager
The provider shared instance.
-
Starts the given login provider flow.
Declaration
Objective-C
+ (void)startLoginProvider:(NSString *)provider success:(void (^)(SIDUser *))success failure:(void (^)(NSError *))failure;
Parameters
provider
The provider name.
success
The success callback, with the SIDUser object.
failure
The failure callback, with the NSError object.
-
Creates and signs in the new user
Declaration
Objective-C
+ (void)createUser:(NSString *)username email:(NSString *)email password:(NSString *)password success:(void (^)(SIDUser *))success failure:(void (^)(NSError *))failure;
Parameters
username
Optional new username.
email
Optional e-mail. At least one of the optional fields must be given.
password
New password
success
The success callback, with the SIDUser object.
failure
The failure callback, with the NSError object.
-
Signs in with existing user
Declaration
Objective-C
+ (void)loginUser:(NSString *)username email:(NSString *)email password:(NSString *)password success:(void (^)(SIDUser *))success failure:(void (^)(NSError *))failure;
Parameters
username
Optional username.
email
Optional e-mail. Exactly one of the optional fields must be given.
password
User password
success
The success callback, with the SIDUser object.
failure
The failure callback, with the NSError object.
-
Updates currrent user data
Declaration
Objective-C
+ (void)updateUserData:(NSDictionary *)userData success:(void (^)(void))success failure:(void (^)(NSError *))failure;
Parameters
userData
Dictionary with fields to be updated.
success
The success callback.
failure
The failure callback, with the NSError object.
-
Sends a reset password email for a user given its username or e-mail.
Declaration
Objective-C
+ (void)resetPassword:(NSString *)username email:(NSString *)email redirectUrl:(NSString *)redirectUrl from:(NSString *)from subject:(NSString *)subject logoUrl:(NSString *)logoUrl description:(NSString *)message language:(NSString *)language success:(void (^)(void))success failure:(void (^)(NSError *))failure;
Parameters
username
Optional new username.
email
Optional e-mail. At least one of these first two fields must be given.
redirectUrl
Optional url to redirect the user to inform the new password.
from
Optional sender email.
subject
Optional email subject.
logoUrl
Optional logo url to display in the email template.
description
Optional introductory message to the user.
language
Optional language configuration. Defaults to English.
-
Handles the application:didFinishLaunchingWithOptions: AppDelegate method.
Declaration
Objective-C
+ (void)application:(id)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
Parameters
application
launchOptions
-
Handles the scene:openURLContexts: SceneDelegate method (new for iOS 13 and Xcode 11).
Declaration
Objective-C
+ (void)scene:(id)scene openURLContexts:(NSSet *)URLContexts;
Parameters
scene
openURLContexts
-
Handles the application:openURL:sourceApplication:annotation AppDelegate method.
Declaration
Objective-C
+ (BOOL)application:(id)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;
Parameters
application
url
sourceApplication
annotation
-
Handles the application:openURL:options AppDelegate method.
Declaration
Objective-C
+ (BOOL)application:(id)application openURL:(NSURL *)url options:(NSDictionary *)options;
Parameters
application
url
options
-
Logs the user out from socialid session and providers.
Declaration
Objective-C
+ (void)logOut;