iCloud无处不在的容器在应用程序删除不清理? [英] iCloud ubiquity containers not being cleaned up on app delete?

查看:253
本文介绍了iCloud无处不在的容器在应用程序删除不清理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将iCloud与Core Data一起添加到应用商店中已经存在的应用中,因此我需要测试升级方案。但是,当我从我的设备删除我的应用程序,并从Xcode重新安装它,我注意到,在我的无处不在的容器文件夹中的一切在设备上是持久的!这是令人难以置信的烦恼,因为iCloud结束了困惑时,试图从事务日志目录中我已经指定并经常超时的文件上传。我最终需要指定一个新的事务日志位置,以使它再次工作,这显然不会在未来为我的测试工作。

I am adding iCloud with Core Data to an app that already exists in the app store, so I need to test upgrade scenarios. However, when I delete my app from my device and re-install it from Xcode, I have noticed that everything inside of my ubiquity container folder on the device is persisted! This is incredibly annoying, as iCloud ends up getting confused when trying to upload files from the transaction logs directory I have specified and often times out. I end up needing to specify a new transaction log location to get it to work again, which will obviously not work in the future for my testing.

以下是错误我收到:


PFUbiquitySafeSaveFile waitForFileToUpload :: CoreData:
Ubiquity:(0)permanentLocation:
:/ private / var / mobile / Library / Mobile
Documents / XXXXXXXXXX〜appnamegoeshere / DatabaseTransactionLogs / mobile.8A0C3F8A-4077-57D7-8250-6BE15D1BCD20 / iCloudData / 8u0BfiCwOkHHa〜o8hF4bunW〜zmdS_C8om5efuugxRaA = / receipt.0.cdt
safeLocation ::
/ private / var / mobile / Library / Mobile
Documents / XXXXXXXXXX〜appnamegoeshere / DatabaseTransactionLogs / mobile.8A0C3F8A-4077-57D7-8250-6BE15D1BCD20 / iCloudData / 8u0BfiCwOkHHa〜o8hF4bunW〜zmdS_C8om5efuugxRaA = / mobile .8A0C3F8A-4077-57D7-8250-6BE15D1BCD20.0.cdt
currentLocation::
/ private / var / mobile / Library / Mobile
Documents / XXXXXXXXXX〜appnamegoeshere / DatabaseTransactionLogs / mobile.8A0C3F8A -4077-57D7-8250-6BE15D1BCD20 / iCloudData / 8u0BfiCwOkHHa〜o8hF4bunW〜zmdS_C8om5efuugxRaA = / mobile.8A0C3F8A-4077-57D7-8250-6BE15D1BCD20.0.cdt

PFUbiquitySafeSaveFile waitForFileToUpload:: CoreData: Ubiquity: (0) permanentLocation: : /private/var/mobile/Library/Mobile Documents/XXXXXXXXXX~appnamegoeshere/DatabaseTransactionLogs/mobile.8A0C3F8A-4077-57D7-8250-6BE15D1BCD20/iCloudData/8u0BfiCwOkHHa~o8hF4bunW~zmdS_C8om5efuugxRaA=/receipt.0.cdt safeLocation: : /private/var/mobile/Library/Mobile Documents/XXXXXXXXXX~appnamegoeshere/DatabaseTransactionLogs/mobile.8A0C3F8A-4077-57D7-8250-6BE15D1BCD20/iCloudData/8u0BfiCwOkHHa~o8hF4bunW~zmdS_C8om5efuugxRaA=/mobile.8A0C3F8A-4077-57D7-8250-6BE15D1BCD20.0.cdt currentLocation: : /private/var/mobile/Library/Mobile Documents/XXXXXXXXXX~appnamegoeshere/DatabaseTransactionLogs/mobile.8A0C3F8A-4077-57D7-8250-6BE15D1BCD20/iCloudData/8u0BfiCwOkHHa~o8hF4bunW~zmdS_C8om5efuugxRaA=/mobile.8A0C3F8A-4077-57D7-8250-6BE15D1BCD20.0.cdt

kv: (null)

kv: (null)

文件安全保存失败,错误:Error Domain = NSCocoaErrorDomain
Code = 512文件上传超时。 UserInfo = 0x1e5b6b10
{NSLocalizedDescription =文件上传超时。

Safe save failed for file, error: Error Domain=NSCocoaErrorDomain Code=512 "The file upload timed out." UserInfo=0x1e5b6b10 {NSLocalizedDescription=The file upload timed out.}

有人知道如何清除无处不在的容器应用安装之间?即使从应用设置中移除无处不在的容器,并重新发布它也无法解决此问题。理论上的客户只要删除应用程序,然后删除它们的iCloud文件就可以解决这个问题。

Does anyone know how to clear out a ubiquity container between app installs? Even removing the ubiquity container from the app settings and republishing it does not fix this issue. A customer in theory would be able to hit this issue just by deleting the app and then deleting their iCloud files for it. This issue has been really frustrating to determine what the cause of the issue is - any suggestions are appreciated!

推荐答案

经过多次的头部冲击后,这个问题真的令人沮丧,我能够想出这一点。有人向我提到,如果您访问developer.icloud.com并使用iCloud帐户登录,您可以查看设备的所有iCloud数据。做一些测试,我可以看到,当我告诉它从我的设备删除iCloud服务器上的数据被立即删除。但是,即使我删除了我的应用程序,我在我的设备上的无处不在容器中创建的所有文件夹和文件仍然保留。

After much head pounding, I was able to figured this out. Someone mentioned to me that you are able to see all of your iCloud data for your device if you go to developer.icloud.com and login with your iCloud account. Doing some tests with this, I was able to see that the data on the iCloud server was being deleted immediately when I told it to delete from my device. However, all of the folders and files I had created in my ubiquity container on my device stayed, even if I deleted my app.

我的工作是检查设置第一次使用iCloud的我的应用程序,看看我的目录是否已经在无处不在的容器。如果他们是,然后我手动删除目录和其中的所有文件用以下代码:

My work around was to check when setting up my app for using iCloud for the first time and see if my directories were already in the ubiquity container. If they were, then I manually delete the directories and all of the files in them with the following code:

 [fileManager removeItemAtPath:[[fileManager URLForUbiquityContainerIdentifier:nil] path] error:&error];

这篇关于iCloud无处不在的容器在应用程序删除不清理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆