Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

请问如何将认证信息同步给 SDK? #27

Open
faith939339094 opened this issue Jan 22, 2021 · 1 comment
Open

请问如何将认证信息同步给 SDK? #27

faith939339094 opened this issue Jan 22, 2021 · 1 comment

Comments

@faith939339094
Copy link

ios SDK 7.1.2版本中, 找不到该方法 pod 'YZAppSDK', '~> 7.1.2'
-(void)synchronizeCookieKey:(NSString *)cookieKey cookieValue:(NSString *)cookieValue;
demo中也找不到, 报错;
请问如何将认证信息同步给 SDK?
image

@faith939339094 faith939339094 changed the title synchronizeCookieKey 请问如何将认证信息同步给 SDK? Jan 22, 2021
@cuncle
Copy link

cuncle commented Nov 9, 2021

参考这个伪代码,7.1.2 版本已经移除了这个方法,直接使用SDK的API去登录。
`... self.webView.noticeDelegate = self ...

// YZWebViewDelegate

  • (void)webView:(YZWebView *)webView didReceiveNotice:(YZNotice *)notice
    {

    switch (notice.type) {
    case YZNoticeTypeLogin: // 收到登陆请求
    {
    [YZSDK.shared loginWithOpenUserId:@"123456" avatar:@"" extra:@"" nickName:@"testnickName" gender:0 andCompletion:^(BOOL isSuccess, NSString * _Nullable yzOpenId) {
    if (!isSuccess) {
    NSLog(@"登录出现异常,请检查入参");
    return;
    }else{
    NSLog(@"登录成功,有赞登录接口返回的 yz_open_id =%@",yzOpenId);
    dispatch_async(dispatch_get_main_queue(), ^{
    [self.webView reload]; // 重新加载页面
    });
    }
    }];
    break;
    }
    }
    }`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants