Very late bugfix: Also wipe data container when uninstalling an app

This commit is contained in:
opa334 2023-11-26 17:39:02 +01:00
parent 27534fb48d
commit 3d89c079a2
1 changed files with 5 additions and 0 deletions

View File

@ -775,6 +775,11 @@ int uninstallApp(NSString* appPath, NSString* appId, BOOL useCustomMethod)
{
LSApplicationProxy* appProxy = [LSApplicationProxy applicationProxyForIdentifier:appId];
// delete data container
if (appProxy.dataContainerURL) {
[[NSFileManager defaultManager] removeItemAtURL:appProxy.dataContainerURL error:nil];
}
// delete group container paths
[[appProxy groupContainerURLs] enumerateKeysAndObjectsUsingBlock:^(NSString* groupId, NSURL* groupURL, BOOL* stop)
{