LiveSDK + iOS 登录:允许权限后不重定向回应用

LiveSDK + iOS login: not redirecting back to the app after allowing permissions

我已经使用 pods 导入了 liveSDK,我的应用程序已设置。

这是我登录 swift 的方式(我也实现了 LiveAuthDelegate):

var live = LiveConnectClient(clientId: ClientID, delegate: self)
live.login(self, scopes: Scopes, delegate: self)
  1. 我看到登录名和密码屏幕,我使用我的凭据登录。
  2. 我获得了权限视图,我可以在其中对请求的权限说是或否
  3. 我点击是
  4. 我得到空白页面...而不是被重定向回我的应用程序

有什么想法吗? 请帮忙

编辑:我想我被重定向到某个页面,例如 https://login.live.com/oauth20_desktop.srf?error=server_error&lc=1033 这个网站和它的空白?可能是什么原因 ? 我尝试在 LiveSDK 中记录 url,但它在 NSLog

上使应用程序崩溃
#pragma mark UIWebViewDelegate methods

(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:    (NSURLRequest *)request 
navigationType:(UIWebViewNavigationType)navigationType 
{
NSURL *url = [request URL];

NSLog([url absoluteString]);

if ([[url absoluteString] hasPrefix: _endUrl]) 
{
[_delegate authDialogCompletedWithResponse:url];
}

// Always return YES to work around an issue on iOS 6 that returning NO may cause
// next Login request on UIWebView to hang.
return YES;
}

最后我正好加了一个retaint:

_liveConnectClientCore = [[[LiveConnectClientCore alloc] initWithClientId:clientId
                                                               scopes:[LiveAuthHelper normalizeScoers:scopes]
                                                            delegate:delegate
                                                           userState:userState] retain];