2015-07-20 40 views
0

我已經導入帶有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; 
} 

回答

0

崩潰的應用程序在最後,我碰巧添加retaint:

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