This commit is contained in:
opa334
2022-09-04 15:37:49 +02:00
parent 5bb621c4fe
commit 06e4075a26
12 changed files with 108 additions and 34 deletions
+1 -1
View File
@@ -50,7 +50,7 @@
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>1.0.4</string>
<string>1.0.5</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>
+9 -1
View File
@@ -55,7 +55,15 @@
{
NSString* appPath = [[TSApplicationsManager sharedInstance] installedAppPaths][indexPath.row];
NSString* appId = [[TSApplicationsManager sharedInstance] appIdForAppPath:appPath];
[[TSApplicationsManager sharedInstance] uninstallApp:appId];
if(appId)
{
[[TSApplicationsManager sharedInstance] uninstallApp:appId];
}
else
{
[[TSApplicationsManager sharedInstance] uninstallAppByPath:appPath];
}
}
}
+1
View File
@@ -17,5 +17,6 @@
- (int)installIpa:(NSString*)pathToIpa force:(BOOL)force;
- (int)installIpa:(NSString*)pathToIpa;
- (int)uninstallApp:(NSString*)appId;
- (int)uninstallAppByPath:(NSString*)path;
@end
+9
View File
@@ -100,9 +100,18 @@
- (int)uninstallApp:(NSString*)appId
{
if(!appId) return -200;
int ret = spawnRoot(helperPath(), @[@"uninstall", appId]);
[[NSNotificationCenter defaultCenter] postNotificationName:@"ApplicationsChanged" object:nil];
return ret;
}
- (int)uninstallAppByPath:(NSString*)path
{
if(!path) return -200;
int ret = spawnRoot(helperPath(), @[@"uninstall-path", path]);
[[NSNotificationCenter defaultCenter] postNotificationName:@"ApplicationsChanged" object:nil];
return ret;
}
@end
+1 -6
View File
@@ -77,13 +77,8 @@
NSURL* url = context.URL;
if (url != nil && [url isFileURL]) {
[url startAccessingSecurityScopedResource];
NSURL* tmpCopyURL = [NSURL fileURLWithPath:[NSTemporaryDirectory() stringByAppendingPathComponent:url.lastPathComponent]];
[[NSFileManager defaultManager] copyItemAtURL:url toURL:tmpCopyURL error:nil];
void (^doneBlock)(BOOL) = ^(BOOL shouldExit)
{
[[NSFileManager defaultManager] removeItemAtURL:tmpCopyURL error:nil];
[url stopAccessingSecurityScopedResource];
[[NSFileManager defaultManager] removeItemAtURL:url error:nil];
@@ -105,7 +100,7 @@
{
// Update TrollStore itself
NSLog(@"Updating TrollStore...");
int ret = spawnRoot(helperPath(), @[@"install-trollstore", tmpCopyURL.path]);
int ret = spawnRoot(helperPath(), @[@"install-trollstore", url.path]);
doneBlock(ret == 0);
NSLog(@"Updated TrollStore!");
}
+1 -1
View File
@@ -1,6 +1,6 @@
Package: com.opa334.trollstore
Name: TrollStore
Version: 1.0.4
Version: 1.0.5
Architecture: iphoneos-arm
Description: An awesome application!
Maintainer: opa334
+2
View File
@@ -30,5 +30,7 @@
<true/>
<key>com.apple.private.uninstall.deletion</key>
<true/>
<key>com.apple.private.security.storage.MobileDocuments</key>
<true/>
</dict>
</plist>