From 755d1d872441192d408f44c1d52413f498ae0918 Mon Sep 17 00:00:00 2001 From: opa334 Date: Mon, 21 Nov 2022 13:27:09 +0100 Subject: [PATCH] 1.4.3 --- RootHelper/control | 2 +- RootHelper/main.m | 28 ++++++++++++++++++++++++++++ TrollHelper/Resources/Info.plist | 2 +- TrollHelper/control | 2 +- TrollStore/Resources/Info.plist | 2 +- TrollStore/control | 2 +- 6 files changed, 33 insertions(+), 5 deletions(-) diff --git a/RootHelper/control b/RootHelper/control index dd53bc1..10e25ff 100644 --- a/RootHelper/control +++ b/RootHelper/control @@ -1,6 +1,6 @@ Package: com.opa334.trollstoreroothelper Name: trollstoreroothelper -Version: 1.4.2 +Version: 1.4.3 Architecture: iphoneos-arm Description: An awesome tool of some sort!! Maintainer: opa334 diff --git a/RootHelper/main.m b/RootHelper/main.m index c6e92ea..5572462 100644 --- a/RootHelper/main.m +++ b/RootHelper/main.m @@ -727,6 +727,34 @@ int uninstallApp(NSString* appPath, NSString* appId) if(appId) { + LSApplicationProxy* appProxy = [LSApplicationProxy applicationProxyForIdentifier:appId]; + + // delete group container paths + [[appProxy groupContainerURLs] enumerateKeysAndObjectsUsingBlock:^(NSString* groupId, NSURL* groupURL, BOOL* stop) + { + // If another app still has this group, don't delete it + NSArray* appsWithGroup = applicationsWithGroupId(groupId); + if(appsWithGroup.count > 1) + { + NSLog(@"[uninstallApp] not deleting %@, appsWithGroup.count:%lu", groupURL, appsWithGroup.count); + return; + } + + NSLog(@"[uninstallApp] deleting %@", groupURL); + [[NSFileManager defaultManager] removeItemAtURL:groupURL error:nil]; + }]; + + // delete app plugin paths + for(LSPlugInKitProxy* pluginProxy in appProxy.plugInKitPlugins) + { + NSURL* pluginURL = pluginProxy.dataContainerURL; + if(pluginURL) + { + NSLog(@"[uninstallApp] deleting %@", pluginURL); + [[NSFileManager defaultManager] removeItemAtURL:pluginURL error:nil]; + } + } + deleteSuc = [[LSApplicationWorkspace defaultWorkspace] uninstallApplication:appId withOptions:nil]; } diff --git a/TrollHelper/Resources/Info.plist b/TrollHelper/Resources/Info.plist index 2ea4272..4c299a0 100644 --- a/TrollHelper/Resources/Info.plist +++ b/TrollHelper/Resources/Info.plist @@ -52,7 +52,7 @@ iPhoneOS CFBundleVersion - 1.4.2 + 1.4.3 LSRequiresIPhoneOS UIDeviceFamily diff --git a/TrollHelper/control b/TrollHelper/control index 88bf02a..40401ff 100644 --- a/TrollHelper/control +++ b/TrollHelper/control @@ -1,6 +1,6 @@ Package: com.opa334.trollstorehelper Name: TrollStore Helper -Version: 1.4.2 +Version: 1.4.3 Architecture: iphoneos-arm Description: Helper utility to install and manage TrollStore! Maintainer: opa334 diff --git a/TrollStore/Resources/Info.plist b/TrollStore/Resources/Info.plist index 046f3f5..c28013f 100644 --- a/TrollStore/Resources/Info.plist +++ b/TrollStore/Resources/Info.plist @@ -50,7 +50,7 @@ iPhoneOS CFBundleVersion - 1.4.2 + 1.4.3 LSRequiresIPhoneOS UIDeviceFamily diff --git a/TrollStore/control b/TrollStore/control index 6c1a241..f9e0f16 100644 --- a/TrollStore/control +++ b/TrollStore/control @@ -1,6 +1,6 @@ Package: com.opa334.trollstore Name: TrollStore -Version: 1.4.2 +Version: 1.4.3 Architecture: iphoneos-arm Description: An awesome application! Maintainer: opa334