Uninstalling app not delete app group data .Do I have to remove app group container and it's content manually?
Asked Answered
V

2

21

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.)

Details of this method is described in Apple's document.

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

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.

Am I wrong?

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.

Vd answered 11/6, 2014 at 8:43 Comment(0)
V
7

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

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

Vd answered 30/7, 2014 at 0:36 Comment(3)
Not fixed here with Xcode 6 GM. Deleting app does not remove its app container data on the simulator.Saragossa
Is there any documentation to back this up?Footage
It is mentionned here developer.apple.com/documentation/foundation/nsfilemanager/… at the bottomWiltshire
W
0

As precised inside the documentation of containerURLForSecurityApplicationGroupIdentifier: (behavior is different whether you are on macOS or iOS)

Unlike in macOS, when all the apps in a given app group are removed from the device, the system detects this condition and removes the corresponding group directory as well.

So the answer to your question is no.

Wiltshire answered 16/9, 2021 at 15:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.