LiveConnectClient login:delegate:userState method
Performs an asynchronous login by presenting a modal window and showing login and authorization forms so that the user can log in to OneDrive and authorize the app to access OneDrive on the user's behalf.
This method optionally provides an LiveAuthDelegate and user state.
Signature
- (void) login:(UIViewController *)currentViewController
delegate:(id<LiveAuthDelegate>)delegate
userState:(id)userState;
Parameters
Name |
Datatype |
Description |
---|---|---|
currentViewController |
UIViewController |
Required. The current UIViewController that presents the login UI in a modal window. |
delegate |
id<LiveAuthDelegate> |
Optional. An app class instance that implements the LiveAuthDelegate protocol. |
userState |
id |
Optional. An object that is used to track the asynchronous state. The userState object is passed as a userState parameter when any LiveAuthDelegate protocol method is invoked. Optional. An app class instance that implements the LiveAuthDelegate protocol. |
Returns
Nothing.
Defined in
LiveConnectClient.h
Remarks
If the current user session already satisfies the scopes specified in the parameter, the delegate method authCompleted:session:userState is invoked right away. At any time, only one login* method can be invoked. If there is a pending login* process ongoing, a call to a login* method receives an exception.