This commit is contained in:
opa334
2022-12-01 00:37:01 +01:00
parent d432d3812a
commit 030ab8fd58
7 changed files with 97 additions and 20 deletions
-1
View File
@@ -362,7 +362,6 @@ extern UIImage* imageWithSize(UIImage* image, CGSize size);
{
[self closeArchive];
}
NSLog(@"open");
_archive = archive_read_new();
archive_read_support_format_all(_archive);
archive_read_support_filter_all(_archive);
+2 -1
View File
@@ -1,7 +1,8 @@
#import <UIKit/UIKit.h>
#import "TSAppInfo.h"
#import <CoreServices.h>
@interface TSAppTableViewController : UITableViewController <UISearchResultsUpdating, UIDocumentPickerDelegate>
@interface TSAppTableViewController : UITableViewController <UISearchResultsUpdating, UIDocumentPickerDelegate, LSApplicationWorkspaceObserverProtocol>
{
UIImage* _placeholderIcon;
NSArray<TSAppInfo*>* _cachedAppInfos;
+16
View File
@@ -79,10 +79,16 @@ UIImage* imageWithSize(UIImage* image, CGSize size)
[self loadAppInfos];
_placeholderIcon = [UIImage _applicationIconImageForBundleIdentifier:@"com.apple.WebSheet" format:iconFormatToUse() scale:[UIScreen mainScreen].scale];
_cachedIcons = [NSMutableDictionary new];
[[LSApplicationWorkspace defaultWorkspace] addObserver:self];
}
return self;
}
- (void)dealloc
{
[[LSApplicationWorkspace defaultWorkspace] removeObserver:self];
}
- (void)reloadTable
{
[self loadAppInfos];
@@ -467,4 +473,14 @@ UIImage* imageWithSize(UIImage* image, CGSize size)
[TSPresentationDelegate presentViewController:appSelectAlert animated:YES completion:nil];
}
- (void)applicationsDidInstall:(id)arg1
{
[self reloadTable];
}
- (void)applicationsDidUninstall:(id)arg1
{
[self reloadTable];
}
@end
+4 -6
View File
@@ -17,8 +17,8 @@ extern NSUserDefaults* trollStoreUserDefaults(void);
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^
{
// Install IPA
//NSString* log;
int ret = [[TSApplicationsManager sharedInstance] installIpa:pathToIPA force:force log:nil];
NSString* log;
int ret = [[TSApplicationsManager sharedInstance] installIpa:pathToIPA force:force log:&log];
NSError* error;
if(ret != 0)
@@ -54,12 +54,12 @@ extern NSUserDefaults* trollStoreUserDefaults(void);
}
else
{
/*UIAlertAction* copyLogAction = [UIAlertAction actionWithTitle:@"Copy Log" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action)
UIAlertAction* copyLogAction = [UIAlertAction actionWithTitle:@"Copy Debug Log" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action)
{
UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
pasteboard.string = log;
}];
[errorAlert addAction:copyLogAction];*/
[errorAlert addAction:copyLogAction];
}
[TSPresentationDelegate presentViewController:errorAlert animated:YES completion:nil];
@@ -187,6 +187,4 @@ extern NSUserDefaults* trollStoreUserDefaults(void);
});
}
//+ (void)showInstallAppAlertForFile:(NSString*)pathToIPA
@end