我正在从旧的 Dropbox Obj-C SDK 迁移到新的。我正在使用旧 SDK 中的以下方法:
- deletePath:
- uploadFile:toPath:withParentRev:fromPath:
- loadMetadata:
- cancelAllRequests
还有一堆代表电话:
- (void)restClient:(DBUserClient*)client
uploadedFile:(NSString*)destPath
from:(NSString*)srcPath
metadata:(DBMetadata*)metadata
- (void)restClient:(DBUserClient*)client uploadFileFailedWithError:(NSError*)error
- (void)restClient:(DBUserClient*)client deletedPath:(NSString *)path
- (void)restClient:(DBUserClient*)client deletePathFailedWithError:(NSError*)error
- (void)restClient:(DBUserClient*)client loadedMetadata:(DBMetadata*)metadata
- (void)restClient:(DBUserClient*)client metadataUnchangedAtPath:(NSString*)path
- (void)restClient:(DBUserClient*)client loadMetadataFailedWithError:(NSError*)error
- (void)sessionDidReceiveAuthorizationFailure:(DBSession*)session userId:(NSString *)userId
新的 SDK 似乎没有类似这些方法或委托的东西。我有点惊讶的是,SDK 会被更新为与现有的完全不同。我在想也许我有什么问题,也许我缺少另一个 SDK?当然,尽管 API 发生了任何变化,但要以一种简单直观的方式维护 SDK,并且不需要对客户端代码进行重大更改,这肯定不会那么难。
我究竟做错了什么?