mirror of
https://github.com/opa334/TrollStore.git
synced 2026-07-02 03:00:39 +08:00
1.4
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
extern NSString *LSInstallTypeKey;
|
||||
|
||||
@interface LSBundleProxy
|
||||
@property (nonatomic,readonly) NSString * bundleIdentifier;
|
||||
@property (nonatomic) NSURL* dataContainerURL;
|
||||
@property (nonatomic,readonly) NSURL* bundleContainerURL;
|
||||
-(NSString*)localizedName;
|
||||
@end
|
||||
|
||||
@@ -26,7 +29,7 @@
|
||||
- (BOOL)_LSPrivateRebuildApplicationDatabasesForSystemApps:(BOOL)arg1 internal:(BOOL)arg2 user:(BOOL)arg3;
|
||||
- (BOOL)openApplicationWithBundleID:(NSString *)arg1 ;
|
||||
- (void)enumerateApplicationsOfType:(NSUInteger)type block:(void (^)(LSApplicationProxy*))block;
|
||||
- (BOOL)installApplication:(NSString*)pathToExtractedApp withOptions:(NSDictionary*)options;
|
||||
- (BOOL)installApplication:(NSURL*)appPackageURL withOptions:(NSDictionary*)options error:(NSError**)error;
|
||||
- (BOOL)uninstallApplication:(NSString*)appId withOptions:(NSDictionary*)options;
|
||||
@end
|
||||
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
#import <Preferences/PSSpecifier.h>
|
||||
|
||||
@interface TSListControllerShared : PSListController
|
||||
{
|
||||
UIAlertController* _activityController;
|
||||
}
|
||||
|
||||
- (BOOL)isTrollStore;
|
||||
- (NSString*)getTrollStoreVersion;
|
||||
- (void)downloadTrollStoreAndDo:(void (^)(NSString* localTrollStoreTarPath))doHandler;
|
||||
|
||||
@@ -190,19 +190,26 @@
|
||||
|
||||
- (void)uninstallTrollStorePressed
|
||||
{
|
||||
UIAlertController* uninstallWarningAlert = [UIAlertController alertControllerWithTitle:@"Warning" message:@"About to uninstall TrollStore and all of the apps installed by it. Continue?" preferredStyle:UIAlertControllerStyleAlert];
|
||||
UIAlertController* uninstallAlert = [UIAlertController alertControllerWithTitle:@"Uninstall" message:@"You are about to uninstall TrollStore, do you want to preserve the apps installed by it?" preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil];
|
||||
[uninstallWarningAlert addAction:cancelAction];
|
||||
|
||||
UIAlertAction* continueAction = [UIAlertAction actionWithTitle:@"Continue" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action)
|
||||
UIAlertAction* uninstallAllAction = [UIAlertAction actionWithTitle:@"Uninstall TrollStore, Uninstall Apps" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action)
|
||||
{
|
||||
spawnRoot(rootHelperPath(), @[@"uninstall-trollstore"], nil, nil);
|
||||
[self handleUninstallation];
|
||||
}];
|
||||
[uninstallWarningAlert addAction:continueAction];
|
||||
[uninstallAlert addAction:uninstallAllAction];
|
||||
|
||||
[TSPresentationDelegate presentViewController:uninstallWarningAlert animated:YES completion:nil];
|
||||
UIAlertAction* preserveAppsAction = [UIAlertAction actionWithTitle:@"Uninstall TrollStore, Preserve Apps" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action)
|
||||
{
|
||||
spawnRoot(rootHelperPath(), @[@"uninstall-trollstore-preserve-apps"], nil, nil);
|
||||
[self handleUninstallation];
|
||||
}];
|
||||
[uninstallAlert addAction:preserveAppsAction];
|
||||
|
||||
UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil];
|
||||
[uninstallAlert addAction:cancelAction];
|
||||
|
||||
[TSPresentationDelegate presentViewController:uninstallAlert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user