mirror of
https://github.com/opa334/TrollStore.git
synced 2025-07-06 16:28:45 +08:00
Create TSTrollStore.m
This commit is contained in:
parent
554f884880
commit
57887a5e8b
21
TrollStore/TSTrollStore.m
Normal file
21
TrollStore/TSTrollStore.m
Normal file
@ -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]];
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user