0

附:Box 的 OneCloud iOS SDK 于 2012 年 12 月 10 日更新。

我们自己管理 Oauth2 身份验证过程,并成功地列出文件并上传它们的新版本,直接调用 REST HTTP 请求,如完整文档中所述。

我们现在想开始使用 SDK,而不必替换所有当前工作的代码。如 Box.h 头文件中所述,我们使用与上述相同的令牌调用initializeSessionWithAuthToken ,但它始终会在 on.after 回调块中返回BoxCallbackResponseUserCancelled 。

来自 Box.h 标头

// 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;

有人成功使用此方法或找到有关返回的错误代码的扩展文档吗?

4

1 回答 1

0

这可能是因为 iOS SDK 是针对我们的 V1 API 构建的,它不支持 OAuth 2。这是我们意识到的差异,我们正在努力移植 iOS SDK 以使用 V2 API。

于 2013-01-28T20:53:39.330 回答