From 57887a5e8b8831360d0e506a65fd2c02dabb33b2 Mon Sep 17 00:00:00 2001 From: a1109471307 <50288272+a1109471307@users.noreply.github.com> Date: Thu, 3 Jul 2025 18:11:31 +0800 Subject: [PATCH] Create TSTrollStore.m --- TrollStore/TSTrollStore.m | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 TrollStore/TSTrollStore.m diff --git a/TrollStore/TSTrollStore.m b/TrollStore/TSTrollStore.m new file mode 100644 index 0000000..20a9de3 --- /dev/null +++ b/TrollStore/TSTrollStore.m @@ -0,0 +1,21 @@ +#import "TSStreamingInstaller.h" +#import "TSExploitManager.h" + +- (void)installIPAAtPath:(NSString *)ipaPath { + // 选择最佳漏洞 + TSExploitDescriptor *descriptor = [[TSExploitManager sharedManager] bestDescriptorForCurrentDevice]; + if (!descriptor) { + [self showErrorAlert:@"No compatible exploit"]; + return; + } + + // 使用流式安装器 + TSStreamingInstaller *installer = [[TSStreamingInstaller alloc] initWithIPAAtPath:ipaPath]; + installer.progressHandler = ^(float progress) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self updateProgress:progress]; + }); + }; + + [installer installToDestination:[self installationPath]]; +}