With: Box’s OneCloud iOS SDK updated on december 10th 2012.
We are managing the Oauth2 authentication process ourselves and are successfully able to list files and upload new versions of them calling directly REST HTTP requests as documented in the full documentation.
We now want to start using the SDK without having to replace all currently working code. As documented in the Box.h header file, we are calling initializeSessionWithAuthToken using the same token as above but it will always returns BoxCallbackResponseUserCancelled in the on.after callback block.
From the Box.h header
// You can also use the Box web APIs detailed at http://developers.box.com to implement your own user login.
// If you choose to do that, please call initializeSessionWithAuthToken:callbacks: with the auth token you
// obtain during login to take advantage of the library after authentication.
// If there is already a user logged in, this method is a no-op. No callbacks will be called in that case.
// Otherwise, this method initializes the authenticating user's session. You can expect your callbacks' on.before to
// be called immediately before initialization. on.after will be called upon success or failure of the operation.
// The response argument will be set accordingly.
+ (void)initializeSessionWithAuthToken:(NSString *)authToken callbacks:(BoxOperationCallbacksDefine)callbacks;
Anyone successfully used this method or found extended documentation on the returned error code?
This is likely due to the fact that iOS SDK is built against our V1 API, which does not support OAuth 2. This is a disparity we’re aware of, and we’re working on porting the iOS SDK to use the V2 API.