Dropbox 仅在 iPad 上不调用委托方法

Dropbox not calling delegate methods on iPad only

我正在使用 Dropbox 将文件上传到用户的 Dropbox。
在 iPhone 上它可以完美运行,但在 iPad 上 DBRestClientDelegate 的委托方法没有被调用。
我还在用 v1.
我使用的代码是

- (DBRestClient *)restClient {
    if (!_restClient) {
        _restClient =
        [[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
        _restClient.delegate = self;
    }
    return _restClient;
}

[[self restClient] uploadFile:[NSString stringWithFormat:@"%@.jpeg",fileName]
                           toPath:@"/"
                    withParentRev:nil
                         fromPath:imagePath];

在 iPhone 委托方法

上调用此方法后
- (void)restClient:(DBRestClient*)client uploadedFile:(NSString*)destPath from:(NSString*)srcPath 

调用成功,让我来处理。然而,在 iPad 上,与其他委托方法一起未被调用, 不会 上传文件并且不会抛出任何错误。

如有任何想法,我们将不胜感激。
谢谢,
卢克

有几件事可能会导致您的委托方法无法被调用:

  1. 您的其余客户端 nil 或正在过早释放(例如,由 ARC)。
  2. 您正在没有 运行 循环的后台线程中进行调用。
  3. 你应该回调的委托方法有错字。不幸的是,如果 SDK 找不到要调用的委托方法,它不会警告您;它只是在没有告诉任何人的情况下完成。