mirror of
https://github.com/opa334/TrollStore.git
synced 2026-07-02 03:00:39 +08:00
1.0.5
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,5 +17,6 @@
|
||||
- (int)installIpa:(NSString*)pathToIpa force:(BOOL)force;
|
||||
- (int)installIpa:(NSString*)pathToIpa;
|
||||
- (int)uninstallApp:(NSString*)appId;
|
||||
- (int)uninstallAppByPath:(NSString*)path;
|
||||
|
||||
@end
|
||||
@@ -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
|
||||
@@ -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
@@ -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
|
||||
|
||||
@@ -30,5 +30,7 @@
|
||||
<true/>
|
||||
<key>com.apple.private.uninstall.deletion</key>
|
||||
<true/>
|
||||
<key>com.apple.private.security.storage.MobileDocuments</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user