卸载应用程序不会删除应用程序组数据。我是否必须手动删除应用程序组容器及其内容? [英] Uninstalling app not delete app group data .Do I have to remove app group container and it's content manually?

查看:169
本文介绍了卸载应用程序不会删除应用程序组数据。我是否必须手动删除应用程序组容器及其内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了第一次在iOS 8中引入的 Today Extension 。要在今天的扩展和它的容器应用之间共享数据,我定义了一个 app组,并将它们绑定到此组。 (实际上我还添加了一个嵌入式框架来重用两边的代码。)

I created a Today Extension that is introduced in iOS 8 first time. To share data between Today extension and it's container App, I defined an app group, and bind them to this group. (Actually I added an embedded framework also to re-use code in both side.)

Apple的文档

我创建了一些核心数据模型并将其作为sqlite存储在组容器中。然后一切都按照我的想法运作。

I created some core data model and store it as sqlite on group container. Then everything works as I thought.

但是,当我卸载容器应用程序时,我的iPhone上仍然有共享容器及其内容。我想当卸载应用程序组的最后一个成员时,必须自动删除此容器。在我的情况下,应用程序组的成员只附带一个应用程序,因此,卸载此应用程序应该必须清除共享容器。

However, when I uninstall container app, There are still shared container and it's content on my iPhone. I think when last member of app group is uninstalled, this container should have to be deleted automatically. In my case, members of app group are shipped with just a single app, So, uninstalling this app should have to clear shared container.

我错了吗?

ps。我找不到以用户身份删除此共享容器的方法。只有拥有访问app-group权限的开发人员才能通过编程删除此容器。

ps. I could not find a way to delete this shared container as an user. Only developer who has rights to access app-group can remove this container with programming.

推荐答案

在iOS8 beta 4中,App组容器当卸载属于该组的最后一个应用时,会自动删除

In iOS8 beta 4, App group container is deleted automatically when the last app that is belongs to the group is uninstalled,

所以,这只是Apple现在修复的一个错误。

So, it was just a bug that is now fixed by Apple.

这篇关于卸载应用程序不会删除应用程序组数据。我是否必须手动删除应用程序组容器及其内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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