liveservices / livesdk-for-ios Goto Github PK
View Code? Open in Web Editor NEWLiveSDK library for integrating with Live Connect
License: MIT License
LiveSDK library for integrating with Live Connect
License: MIT License
Is this supposed to have a .framework file? I can't find it anywhere. I'm following the instructions of referencing the API source code directly, but it won't show me the login screen (it's just empty).
Regards,
F
Error Domain=LiveServicesErrorDomain Code=5 "The operation couldn’t be completed. (LiveServicesErrorDomain error 5.)" UserInfo=0xaa965b0 {message=The provided URL is not valid. The requested path 'XXXXX' is not supported., code=request_url_invalid}
LiveSDK framework is running into linking errors in build phase for iOS6.
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: LiveSDK.framework for architecture armv7s
It looks like that LiveSDK must be recompiled for iOS6 in xcode4.5 to generate LiveSDK framework for new armv7s architecture.
Please include unarchived LiveSDK.framework in repository so everybody can include it as submodule.
src/LiveSDK.xcodeproj/xcuserdata/liwa.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
src/LiveSDK.xcodeproj/xcuserdata/liwa.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
src/LiveSDK.xcodeproj/xcuserdata/liwa.xcuserdatad/xcschemes/LiveSDK.xcscheme
src/LiveSDK.xcodeproj/xcuserdata/liwa.xcuserdatad/xcschemes/LiveSDKAggregate.xcscheme src/LiveSDK.xcodeproj/xcuserdata/liwa.xcuserdatad/xcschemes/LiveSDKForiOS.xcscheme src/LiveSDK.xcodeproj/xcuserdata/liwa.xcuserdatad/xcschemes/xcschememanagement.plist
Dear all,
i have suffered in this case just a day ago, and there are no other similar case in the internet.
I was able to sign in to Live Services and passed the consent form a day ago. However, i was than failed to sign in through the Auth Dialog 9 hours after the first successful sign in, during the 9 hours, no code changes has been made.
The error message i received from XCode are shown below:
Any Idea?
Hi..
I download this 5.6.1 release file and extract it.
But, I cannot find the LiveSDK.framework files
only LiveSDK_framework.
I try to use [liveClient logoutWithDelegate:self userState:@"logout"] to logout and clear last cookie, but afterwards I invoke [self.liveClient login:self scopes:scope delegate:self userState:@"signin"]; and LiveSDK does not show the user/password input page.
Is this a bug, or is there any other way to really logout as clearing cookies please kindly help to tell me, thanks.
I found that the upload only support NSData and NSInputStream, however when i upload an file larger than 1GB, the app will crash as the memory is limited, I found that someone adjust me to upload by NSFileHandler to post data by pieces, I separated the file to every piece of 1MB, and use the http-header "Content-Range", but it seems not work, it can only upload the first 1MB, and this is my code according to the msdn library, I didn't know if the server support this way:
NSData *putData = [self uploadSubdataWithOffset:offset length:dataLength];
NSString *rangeString = [NSString stringWithFormat:@"bytes */%lu-%lu/%lu",(unsigned long)offset,(unsigned long)offset+dataLength-1,(unsigned long)dataLength];
[_request setValue:rangeString forHTTPHeaderField:@"Content-Range"];
[_request setValue:[NSString stringWithFormat:@"%llu",(unsigned long long)_chunckSize] forHTTPHeaderField:@"Content-Length"];
[_request setValue:[NSString stringWithFormat:@"%llu",[_fileHandler seekToEndOfFile]] forHTTPHeaderField:@"X-Upload-Content-Length"];
[_request setValue:[self fileMimeType:uploadFilePath] forHTTPHeaderField:@"X-Upload-Content-Type"];
[bodyData resetBytesInRange:NSMakeRange(0, [bodyData length])];
[bodyData setLength:0];
NSString * boundary = @"A300x";
[bodyData appendData:[[NSString stringWithFormat:@"--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[bodyData appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"file\"; filename=\"%@\"\r\n", uploadFileName] dataUsingEncoding:NSUTF8StringEncoding]];
[bodyData appendData:[[NSString stringWithFormat:@"Content-Type: %@\r\n\r\n", @"application/octet-stream"] dataUsingEncoding:NSUTF8StringEncoding]];
[bodyData appendData:putData];
[bodyData appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[_request setHTTPBody:putData];
_connection = [[NSURLConnection alloc] initWithRequest:_request delegate:self];
[_connection start];
As I need the uploading pause and resume, and the large file must support as well,so I had to do it by this, can you give me any help about this? Thanks very much for your patient
When using LiveSDK I log out and try to log in again modal auth dialog is loaded but it is blank, no error code returned, after some time webview returns with timeout.
Issue can be reproduced in LiveSDKTestBed as well.
Steps to reproduce:
1)Log in
2)Log out
3)Log in again
In rare cases you would need to do 2-3 signouts, but mostly 1 would be enough.
If application is closed(killed) login works again.
Hi,
Please Create a new release (the last one is 4 mouthes ago)with the commit "Merge pull request #62 from aclev/fixMemoryIssues "
I'm using cocoapods, and the SDK crashed on the dealloc.
I would liekto (am in the progress of) rewriting the livesdk client. I use it for myself, so this is not a community offering per se. But I just cant stand how this thing works. The only thing worse is the dropbox rest API. We are trying to compose things here, many times in blocks which are emenable to GCD threading etc. The fact that live SDK either returns succeeded or failed with mystery metadata is completely unacceptable. Ive worked around it for my purposes. But sincerely, I would like to offer to rewrite the whole obj C client. Not to make you feel bad or me feel good. This just isnt right. I have used it as is, and thats fine, But I have many more things to do and this API is just a pain. let me know.
Hi, liwa
If the photo is larger than 2048x2048,photo will resize photos to 2048 px automatically.
Can I upload a photo as origonal file size to SkyDrive?
Titel
In README:
Visit: http://dev.live.com and click the "Documentation" link.
There is no such link in that page, maybe you can link to http://msdn.microsoft.com/en-us/library/live/hh875197.aspx or something like that.
Redirecting iOS SDK users to dev.live.com is a bad idea. I googled to find the link I pasted above because I got lost in that website.
CocoaPods is a tool for managing dependencies for OS X and iOS Xcode projects and provides a central repository for iOS/OS X libraries. This makes adding libraries to a project and updating them extremely easy and it will help users to resolve dependencies of the libraries they use.
However, <LiveSDK-for-iOS>
doesn't have any version tags. Currently a pod cannot be submitted to the podspec repository referencing a specific commit - a version tag must be specified.
Semantic version tags (instead of plain commit hashes/revisions) allow for resolution of cross-dependencies.
In case you didn’t know this yet; you can tag the current HEAD as, for instance, version 1.0.0, like so:
$ git tag -a 1.0.0 -m "Tag release 1.0.0"
$ git push --tags
Hi, nice to meet you.
I find a issue about LiveOperationCore.
The property of delegate was set readonly,
but LiveOperation Class's method "setDelegate"
Hi,
This is Loganathan from SignEasy. We have integrated the OneDrive SDK in our iOS app (https://itunes.apple.com/app/signeasy/id381786507?mt=8). With iOS8 and Xcode6.0, when we submit the app to Apple, Xcode's binary uploader shows an error as attached below.
OneDrive SDK integration guide mentions that we need to include the SDK framework in the copy bundle resource, but Apple does not allow the submission of the app binary if we do so. If we don't add the OneDrive SDK framework in the copy bundle section, then SignEasy crashes when i try to initialize the library in our code.
Please let us know how we can fix this. I am reachable at [email protected].
Thanks,
Sunil
Has any work been considered yet to implement OneDrive for Business support now that the OneDrive for Business (preview) is out?
Please add support for Cocoapods. This dependency manager for iOS is standard in the industry and pretty straightforward to set up.
LiveConnectClient don't show any method to download a big file to disk and not to memory .
Is there a way to download directly to disk?
Thank you
Scinfu
Hello.
First of all: thanks for you work guys!
I have inspected source code of SDK and found some bugs in memory management.
So look at them.
- (id) initWithClientId:(NSString *)clientId
scopes:(NSArray *)scopes
delegate:(id<LiveAuthDelegate>)delegate
userState:(id)userState
{
self = [super init];
if (self)
{
...
_storage = [[[LiveAuthStorage alloc] initWithClientId:clientId] retain];
...
}
[self refreshSessionWithDelegate:delegate
userState:userState];
return self;
}
- (void) refreshSessionWithDelegate:(id<LiveAuthDelegate>)delegate
userState:(id)userState
{
if ([LiveAuthHelper shouldRefreshToken:_session
refreshToken:_storage.refreshToken])
{
authRefreshRequest = [[[LiveAuthRefreshRequest alloc] initWithClientId:_clientId
scope:_scopes
refreshToken:_storage.refreshToken
delegate:delegate
userState:userState
clientStub:self]
retain];
...
}
else
{
...
}
}
- (id) initWithClientId:(NSString *)clientId
scopes:(NSArray *)scopes
delegate:(id<LiveAuthDelegate>)delegate
userState:(id)userState
{
...
if (self)
{
_liveClientCore = [[[LiveConnectClientCore alloc] initWithClientId:clientId
scopes:[LiveAuthHelper normalizeScopes:scopes]
delegate:delegate
userState:userState]
retain];
}
return self;
}
- (void)authorize
{
...
self.authViewController = [[LiveAuthDialog alloc] initWithNibName:nibName
bundle:[LiveAuthHelper getSDKBundle]
startUrl:authRequestUrl
endUrl:[LiveAuthHelper getDefaultRedirectUrlString]
delegate:self];
...
}
+ (id) readAuthResponse:(NSData *)data
{
NSString* responseString = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding];
...
if (accessToken != nil)
{
...
}
else
{
if (error == nil)
{
return [LiveAuthHelper createAuthError:LIVE_ERROR_CODE_LOGIN_FAILED
info:params];
}
else
{
return [LiveAuthHelper createAuthError:LIVE_ERROR_CODE_RETRIEVE_TOKEN_FAILED
errorStr:LIVE_ERROR_CODE_S_RESPONSE_PARSING_FAILED
description:[NSString stringWithFormat:@"Unable to read response: %@", responseString]
innerError:error];
}
return error;
}
}
- (id) initWithJSONStringValue:(NSString*)value
{
long long timeValue = 0L;
NSDate *date = nil;
...
if ([scanner scanString:@"/Date(" intoString:NULL] || [scanner scanString:@"\\/Date(" intoString:NULL])
{
...
date = [[NSDate dateWithTimeIntervalSince1970:(timeValue / 1000.0)] retain];
return date;
}
...
[self release];
}
And some mistakes with retaining delegates.
- (id) initWithMethod:(NSString *)method
path:(NSString *)path
requestBody:(NSData *)requestBody
delegate:(id)delegate
userState:(id)userState
liveClient:(LiveConnectClientCore *)liveClient;
- (id) initWithMethod:(NSString *)method
path:(NSString *)path
inputStream:(NSInputStream *)inputStream
delegate:(id)delegate
userState:(id)userState
liveClient:(LiveConnectClientCore *)liveClient;
+[June 13, 2012]
Class LiveOperation
- (id) initWithOpCore:(LiveOperationCore *)opCore
{
self = [super init];
if (self)
{
liveOpCore = opCore;
liveOpCore.publicOperation = self;
}
return self;
}
This initialization method creates cycle. So LiveOperation and LiveOperationCore objects will not be deallocated.
Best regards, Yuriy Muzyukin
Hello,
When I'm uploading a big file using
self.uploadOperation = [self.liveClient uploadToPath:path
fileName:file.name
inputStream:fileStream
overwrite:liveOverwrite
delegate:self
userState:@"uploadFile"];
It starts uploading the file as expected (the progress delegate is correctly called), but after 120 seconds it stop uploading and is returning a timeout error ...
There are some problems with ARC (i tested it in Xcode Version 6.1.1 (6A2008a)) with variables that are "@synthesize varName" and invoking their @selectors like ["varName" function] instead of ["self.varName" function] will throw an "unknown selector exception" because, it seems, that the variable gets an arbitrary type that does not have implemented that selector, or if the random type implements the @selector "function" then the object pointed by "varName" will be released and deallocated from memory.
For example in file LiveConnectClientCore.m
@synthesize clientId = _clientId,
scopes = _scopes,
session = _session,
status = _status,
authRequest = _authRequest,
authRefreshRequest;
FUNCTION:
(void)dealloc
{
[authRefreshRequest cancel];
--here "authRefreshRequest" has some times type NSData, some times NSString, etc... and it will crash with "unknown selector exception" since none of this types don't implement "cancel" method.
--calling [self.authRefreshRequest cancel] will fix the problem.
[_clientId release];
[_scopes release];
[_session release];
[_authRequest release];
[_storage release];
[authRefreshRequest release];
--here at this call will release arbitrary objects from memory
--calling [self.authRefreshRequest release]; will fix the problem
[super dealloc];
}
Similar problems are in multiple files:
LiveAuthDialog.m: @synthesize webView, canDismiss,
LiveAuthRefreshRequest.m: @synthesize tokenConnection, tokenResponseData;
LiveDownloadOperation.m: @synthesize data;
LiveOperation.m: @synthesize liveOpCore;
LiveOperationCore.m: @synthesize streamReader,
request,
publicOperation,
rawResult,
result,
connection,
httpResponse,
responseData,
completed,
httpError;
StreamReader.m: @synthesize data,
Steps to reproduce in an ARC enabled project with LiveSDK pod installed
A) Obtain an access token for an OneDrive account with "wl.offline_access" visible in scopes;
B) Kill the application;
C)Start the application (at this moment an refresh token exists and authRefreshRequest will be instantiated).
D)Do a logout like this:
[self.liveConnectClient logout];
self.liveConnectClient = nil;
Thanks,
Have a nice day!
Hi,
I just downloaded the SDK and I found this problem on my app and on your app(after changing the client ID) after confirming the permission:
Error Domain=LiveServicesErrorDomain Code=1 "The operation couldn’t be completed. (LiveServicesErrorDomain error 1.)" UserInfo=0x2018bfa0 {error_description=The authorization request failed to complete., internal_error=Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" UserInfo=0x20187000 {NSErrorFailingURLKey=https://oauth.live.com/authorize?display=page&response_type=code&redirect_uri=https://oauth.live.com/desktop&scope=wl.signin&locale=en-GB&client_id=00000000400C3C10, NSErrorFailingURLStringKey=https://oauth.live.com/authorize?display=page&response_type=code&redirect_uri=https://oauth.live.com/desktop&scope=wl.signin&locale=en-GB&client_id=00000000400C3C10}, error=request_failed}
Steps to reproduce:
Regards,
Jeffrey
after applying the patch, uploaded files whose filename contains non-ascii chars showed escaped codes, i.e. %EB%99%BA%20%99.pdf
I am attempting to authenticate Microsoft users using the LiveConnectClient
class. I have setup my implementation exactly as is done in the examples. Upon a successful login, the login UI is dismissed, and then my application crashes with a Bad Access exception. Enabling NSZombies, I see the following error in the debugger on crashing:
[LiveAuthRequest authDialogDisappeared]: message sent to deallocated instance 0xdde5cc0
In one particular test I got a slightly different exception message, though my code hadn't changed:
[_NSCFDictionary authDialogDisappeared]: unrecognized selector sent to instance
I'm guessing that this only occurred because a dictionary happened to be allocated at the address of the recently deallocated LiveAuthRequest. Either way, this is a fatal error that is halting my integration of this SDK.
Every time I restart the simulator I have to login again because the LiveConnectSession session will be nil. Is there any way to persist the session to keychain? like google oauth sdk does?
I followed your instructions as detailed in the ReadMe to add as a framework, but I am unable to get the project into the App Store with Xcode 6.1. The project works fine in the simulator and devices.
The error says: "iTunes Store operation failed. Unsupported Architectures. Your executable contains unsupported architectures '[x86_64, i386]'."
The error does go away if I remove the Live SDK.
hello ,
when i try to build for 64bit i get this error
Undefined symbols for architecture arm64:
"OBJC_CLASS$_LiveConnectClient", referenced from: objc-class-ref
can you help me please
The current version of the SDK is not App Store comliant, as the sign-in page contains a link to create an account. Dropbox had similar problems, see here:
In this repo.
https://github.com/braveS/APOneDriveWrapper
This is not ideal solution, but it works.
I'm using the latest version (5.6.1) and I have found a few memory management issues.
refreshSessionWithDelegate:userState:
method, the assignment to the authRefreshRequest
ivar needs to be changed to self.authRefreshRequest
or the autorelease
needs to be removed.initWithClientId:
method, the assignment to _clientId
needs a copy
(or retain
). This problem doesn't appear when passing in a string literal but it causes a crash otherwise.use uploadToPath API for file uploading
uploading always fail when filename contains " " space, i.e. "xxx yyy.pdf" will fail, but "xxx_yyy.pdf" will succeed
I entered my CLIENT_ID which I got from http://manage.dev.live.com/. I specified mobile for my application. Running on iOS 6.1 simulator.
I run the SDK with wl.signin and me
and I get:
We're unable to complete your request.
Microsoft account is experiencing technical problems. Please try again later.
Is there something else I need to do to get the sign in to work?
Thanks!
Aron
Make available a method to allow easy login, without UI, so developers could us their own UI.
Hi,liwa
When uploading Archive file
Error Domain=LiveServicesErrorDomain Code=5 "The operation couldn’t be completed. (LiveServicesErrorDomain error 5.)" UserInfo=0x1331860 {message=The requested operation could not be completed. The provided file type is not supported. Only photos, videos and document file types are supported., code=request_parameter_invalid}
Currently logout is simply clearing cookies and not logging out from OneDrive.
If we grant access to app with scopes including "wl.offline_access" and after we call [liveClient logout], we can sign in again without entering password and granting access to app.
By removing scope "wl.offline_access" we need to grant access (press YES/NO in webView) for app every first upload/quiery/sign in operation after restarting the application.
Current behavior does not allow to use multiple accounts on one device. Only reinstalling the app helps to sign out completely.
Please, add/rewrite the method to logout fully.
Thanks in advance.
I have an app in the store that use LiveSDK API to log the user into OneDrive. The last release was pushed before iOS8 came out, but it works without problem with iOS8
Now I want to push an update (unrelated to OneDrive features) and I am using xcode 6.1.1 but testing the app I noticed that every time the user is authenticated into OneDrive the app will crash as soon as return from a segue or flipside view to the Main View.
I was able to isolate the issue to this line added in viewDidLoad:
self.liveClient = [[LiveConnectClient alloc] initWithClientId:APP_CLIENT_ID
delegate:self
userState:@"initialize"];
and I really followed the basic instructions on how to login that can be found here:
http://msdn.microsoft.com/en-us/library/dn631822.aspx#sign_the_user_in
The steps to reproduce the issue (on both thee device and the simulator) are the following:
a) app starts b) click to the cloud service login button that will trigger a flipsideviewcontroller c) log into OneDrive with the code provided by MS d) go back to the main controller e) CRASH!
The trace is the following:
*** First throw call stack:
(
0 CoreFoundation 0x028dd1e4 exceptionPreprocess + 180
1 libobjc.A.dylib 0x026598e5 objc_exception_throw + 44
2 CoreFoundation 0x0297a243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
3 CoreFoundation 0x028cd50b __forwarding + 1019
4 CoreFoundation 0x028cd0ee _CF_forwarding_prep_0 + 14
5 CloudFella 0x0015c867 -[LiveConnectClientCore dealloc] + 48
6 libobjc.A.dylib 0x0266a692 _ZN11objc_object17sidetable_releaseEb + 268
7 libobjc.A.dylib 0x0266baeb -[NSObject release] + 25
8 CloudFella 0x00158af1 -[LiveConnectClient dealloc] + 44
9 libobjc.A.dylib 0x0266a692 _ZN11objc_object17sidetable_releaseEb + 268
10 libobjc.A.dylib 0x02669e81 objc_release + 49
11 libobjc.A.dylib 0x02669e3e objc_storeStrong + 39
12 CloudFella 0x00157b9d -[CFFlipsideViewController .cxx_destruct] + 249
13 libobjc.A.dylib 0x026582d4 _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 128
14 libobjc.A.dylib 0x0265824f object_cxxDestruct + 20
15 libobjc.A.dylib 0x0266327a objc_destructInstance + 48
16 libobjc.A.dylib 0x026632ab object_dispose + 20
17 UIKit 0x01433d1a -[UIViewController dealloc] + 1854
18 UIKit 0x01430915 -[UIViewController release] + 89
19 libobjc.A.dylib 0x02669e97 objc_release + 71
20 libobjc.A.dylib 0x02656bf0 objc_setProperty_nonatomic + 48
21 UIKit 0x01a6167d -[_UIViewControllerOneToOneTransitionContext _setFromViewController:] + 47
22 UIKit 0x01a61490 -[_UIViewControllerOneToOneTransitionContext dealloc] + 43
23 libobjc.A.dylib 0x0266a692 _ZN11objc_object17sidetable_releaseEb + 268
24 libobjc.A.dylib 0x0266baeb -[NSObject release] + 25
25 UIKit 0x01a60834 -[_UIViewControllerTransitionContext completeTransition:] + 135
26 UIKit 0x01a7a5b1 -[UIViewControllerBuiltinTransitionViewAnimator transitionViewDidComplete:fromView:toView:removeFromView:] + 50
27 UIKit 0x01416137 -[UITransitionView notifyDidCompleteTransition:] + 345
28 UIKit 0x01415e61 -[UITransitionView _didCompleteTransition:] + 1333
29 UIKit 0x014181b7 -[UITransitionView _transitionDidStop:finished:] + 107
30 UIKit 0x013666dc -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 267
31 UIKit 0x013669c8 -[UIViewAnimationState animationDidStop:finished:] + 80
32 QuartzCore 0x00fd6bb4 _ZN2CA5Layer23run_animation_callbacksEPv + 304
33 libdispatch.dylib 0x0326b4d0 _dispatch_client_callout + 14
34 libdispatch.dylib 0x03259726 _dispatch_main_queue_callback_4CF + 340
35 CoreFoundation 0x0294243e CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 14
36 CoreFoundation 0x028835cb __CFRunLoopRun + 1963
37 CoreFoundation 0x028829d3 CFRunLoopRunSpecific + 467
38 CoreFoundation 0x028827eb CFRunLoopRunInMode + 123
39 GraphicsServices 0x0301f5ee GSEventRunModal + 192
40 GraphicsServices 0x0301f42b GSEventRun + 104
41 UIKit 0x01316f9b UIApplicationMain + 1225
42 CloudFella 0x000eeea6 main + 94
43 libdyld.dylib 0x034af6d9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
If I log into the other cloud services available in my app I got no issues at all.
The problem is happening with both the old LiveSDK API (the one included in the current good release out in the store) and the newest build (2 months old) added to the app to solve some validation issues described here: #43
I suspect that going from Xcode 5 to xcode 6 something changed in the building parameters that is causing the issue, however I am not sure where the issue is and how to workaround.
As test I forced building the app for 32 bit architectures only but it crashed as well: this was expected as the LiveSDK API is compatible with 64 bit arch, but certainly wanted to try... .
Any help is greatly appreciated.
Thanks, dom
1.It has a lot of memory leak
2.When I try to login, sometimes it success, but many times it failed with some strange code=-999
3.Your sample code can not sign in!
Included image 'backArrow_black' used for the button is a non-retina image.
Problem:
Retaining delegate in initialization method of LiveAuthRequest class causes the memory leak.
Solution:
Replace code:
- (id) initWithClient:(LiveConnectClientCore *)client
scopes:(NSArray *)scopes
currentViewController:(UIViewController *)currentViewController
delegate:(id<LiveAuthDelegate>)delegate
userState:(id)userState
{
self = [super init];
if (self)
{
// ...
_delegate = [delegate retain];
// ...
}
return self;
}
with the following code:
- (id) initWithClient:(LiveConnectClientCore *)client
scopes:(NSArray *)scopes
currentViewController:(UIViewController *)currentViewController
delegate:(id<LiveAuthDelegate>)delegate
userState:(id)userState
{
self = [super init];
if (self)
{
// ...
_delegate = delegate;
// ...
}
return self;
}
And delete corresponding string in the dealloc method:
- (void)dealloc
{
// ...
[_scopes release];
//[_delegate release]; - these string should be deleted because we don't retain delegate while initialization.
[_userState release];
//...
[super dealloc];
}
Best regards, Yuriy Muzyukin.
Crash issue
(id)initWithStream:(NSInputStream *)stream
delegate:(id)delegate
{
self = [super init];
if (self)
{
_stream = stream; //NEED RETAIN
_delegate = delegate;
}
return self;
}
(void)dealloc
{
[_stream release];
[data release];
[super dealloc];
}
I run LiveSDK in IOS5.1, everything is OK , the demo in the package runs very well . But after i changed to IOS6.0 , once after I signed in , I got some error message in the console:
2013-04-26 21:51:06.267 LiveSDKTestBed[6820:17607] 6820: CFNetwork internal error (0xc01a:/SourceCache/CFNetwork_Sim/CFNetwork-609/Connection/URLConnectionLoader.cpp:471)
2013-04-26 21:51:06.268 LiveSDKTestBed[6820:17607] 6820: CFNetwork internal error (0xc01a:/SourceCache/CFNetwork_Sim/CFNetwork-609/Connection/URLConnectionLoader.cpp:635)
then after I signed out and signed in again the dialog is there with no sign in web page to load.After a few seconds the dialog automaticlly dismissed and I got the error message below:
2013-04-26 21:57:16.978 LiveSDKTestBed[6820:11303] Error received. Context: auth failed during login
2013-04-26 21:57:16.980 LiveSDKTestBed[6820:11303] Error detail: Error Domain=LiveServicesErrorDomain Code=1 "The operation couldn’t be completed. (LiveServicesErrorDomain error 1.)" UserInfo=0x889c590 {error_description=The authorization request failed to complete., internal_error=Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x88a6a40 {NSErrorFailingURLStringKey=https://login.live.com/oauth20_authorize.srf?display=ios_tablet&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf&scope=wl.signin&locale=en&client_id=00000000440E9722, NSErrorFailingURLKey=https://login.live.com/oauth20_authorize.srf?display=ios_tablet&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf&scope=wl.signin&locale=en&client_id=00000000440E9722, NSLocalizedDescription=The request timed out., NSUnderlyingError=0x75c7da0 "The request timed out."}, error=request_failed}
I can find what the problem it is .
My app saves tokens back to server to give user cross devices/platform experience. But I can't find a way to set tokens back to a LiveConnectSession. I have to reference the whole SDK source code, instead of the binary framework. It would be wonderful if you guys can simply support this feature, thanks!
i'm trying to implement a multi connexion on my ios app so i can add two oneDrive account on my app , so i need to save the LiveConnectSession and set it to the current LiveConnectClient but the session property of the LiveConnectClient is readonly , so is there any way to do this?
Thanks for the sdk but I did not found the api of list the files at one path, i need to get the file list show, can you please tell me how to do it? Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.