Login (required)
Description
Used for user login. According to the different login conditions, there are two display interfaces, as shown below:
- 1、The first time you log in, there are multiple login methods that require the user to select to log in (example image):

- 2、More than two times (including the second time), this time will be directly logged in (called: free login), does not require the user to enter the corresponding account password again (examples):

Method
objective-c
- (void)gamedreamerLoginWithSuperView:(UIView *)superView
andCompletion:(void (^)(NSDictionary *userInfo, NSError *error))loginCallback;Parameter
| Parameter name | Is Null | Description |
|---|---|---|
| superView | true | The parent view of the login view, passed into the parent view allows the login view to be added to the parent view. This parameter can be nil. When nil is passed in, the SDK internally adds the view to the keywindow for display. |
Callback
userInfo:
| Parameter | Description |
|---|---|
| EFunfunServerInfo | 1、address:Server IP; ; 2、gamecode:game code; ; 3、port:prot; ; 4、ServerName:Server Name; ; 5、servercode:Server ID; ; 6、status:Server Status(1 is Open,0 is Close); ; 7、repairNoticeContext |
| sessionid | Login 's Session id |
| token | Login 's token |
| showname | account nickname |
error(When the parameter is not empty, it means that the login failed)
Example code
objective-c
[[GamedreamerManager shareInstance] gamedreamerLoginWithSuperView:self.view andCompletion:^(NSDictionary *userInfo, NSError *error){
if(error){
//error processing
}else{
//Login successful processing
}
}];