LiveSDK + iOS登录:在允许权限后未重定向回应用程序

问题描述:

我已经导入带有pod的liveSDK,我的应用已设置。LiveSDK + iOS登录:在允许权限后未重定向回应用程序

这是我在如何迅速登陆(我已经实现LiveAuthDelegate太):

var live = LiveConnectClient(clientId: ClientID, delegate: self) 
live.login(self, scopes: Scopes, delegate: self) 
  1. 我得到的登录名和密码的屏幕,我和我的凭据登录。
  2. 我得到的权限查看,我可以说yes或no的问权限
  3. 我点击是
  4. 我得到的空白页...而不是重定向回我的应用程序

任何想法? 请帮忙

编辑:我想我被重定向到一些页面,如https://login.live.com/oauth20_desktop.srf?error=server_error&lc=1033这个网站和它的空白?可能是什么原因 ? 我试图登录的LiveSDK的网址,但其对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];