ios - 在 iOS 中取消帐户与 Dropbox 的链接

标签 ios dropbox

我正在使用 Dropbox 同步我的应用程序中的文件。当尝试取消帐户与 Dropbox 的链接时,使用以下语句:

[[[DBAccountManager sharedManager] linkedAccount] 取消链接];

iPhone 4S 大约需要 1 秒,模拟器稍长一些,3GS 相当长,但是对于 iPhone 5,它看起来根本无法正常工作!。这可能是内存问题吗?我在这里遗漏了什么吗?

感谢您的建议!

伊桑

最佳答案

来自保管箱 forum .只有在同步/下载完成后,取消链接才会完成。

使用 GCD 对我有用。

- (void)dropboxLogout {
    self.isLogingOut = YES;
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
        [[[DBAccountManager sharedManager] linkedAccount] unlink];
        self.isLogingOut = NO;
    });
}

我使用 isLogingOut 标志来防止我的应用程序在取消链接过程中进一步与保管箱 api 通信。

关于ios - 在 iOS 中取消帐户与 Dropbox 的链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16934888/

相关文章:

ios - 在 Worklight 应用程序中集成 Crashlytics 时找不到 sqlcipher 框架

ipad - 将 ipadsDetailViewController 设置为 UIWebView

dropbox - 与 Dropbox 并行结对编程

git + dropbox问题

ios - cocoa 从 2 个字符之间获取多个子字符串

ios - Swift 4 与 unity3d 5.6.6f2 的集成

javascript - 从保管箱流式传输视频?可能的字节范围问题

fonts - Dropbox 上的 Google Webfont 问题

ios - Swift - 如何在约束中动态更改 textView 高度?

java - 使用 Dropbox 进行分页