我们自己管理Oauth2身份验证过程,并且能够成功地列出文件并上传新版本的文件,直接调用REST full documentation中记录的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;
是否已成功使用此方法或找到有关返回错误代码的扩展文档?
答案 0 :(得分:0)
这可能是因为iOS SDK是针对我们的V1 API构建的,它不支持OAuth 2.这是我们所知道的差异,我们正在努力移植iOS SDK以使用V2 API。