I have imported liveSDK with pods, my app is set.
This is how I login in swift (I've implemented LiveAuthDelegate too):
var live = LiveConnectClient(clientId: ClientID, delegate: self)
live.login(self, scopes: Scopes, delegate: self)
Any ideas ? please help
EDIT: i think i am redirected to some page like https://login.live.com/oauth20_desktop.srf?error=server_error&lc=1033 this site and its blank? what could be the reason ? I tried logging the url in the LiveSDK, but its crashing the app on 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;
}
In the end i happened to add a retaint:
_liveConnectClientCore = [[[LiveConnectClientCore alloc] initWithClientId:clientId
scopes:[LiveAuthHelper normalizeScoers:scopes]
delegate:delegate
userState:userState] retain];