This commit is contained in:
opa334 2022-10-30 12:48:01 +01:00
parent ef6b70185c
commit ff0c2a2fb5
10 changed files with 49 additions and 39 deletions

View File

@ -1,6 +1,6 @@
Package: com.opa334.trollstoreroothelper
Name: trollstoreroothelper
Version: 1.3
Version: 1.3.1
Architecture: iphoneos-arm
Description: An awesome tool of some sort!!
Maintainer: opa334

View File

@ -17,6 +17,8 @@
<true/>
<key>com.apple.private.security.storage.AppBundles</key>
<true/>
<key>com.apple.private.security.storage.MobileDocuments</key>
<true/>
<key>com.apple.private.MobileContainerManager.allowed</key>
<true/>
<key>com.apple.private.MobileInstallationHelperService.InstallDaemonOpsEnabled</key>

View File

@ -59,23 +59,20 @@ static UIAlertController* g_activityController;
[self startActivity:activity withCancelHandler:nil];
}
+ (void)stopActivityWithCompletion:(void (^)(void))completion
+ (void)stopActivityWithCompletion:(void (^)(void))completionBlock
{
if(!self.activityController) return;
[self.activityController dismissViewControllerAnimated:YES completion:^
{
self.activityController = nil;
if(completion)
{
completion();
}
if(completionBlock) completionBlock();
}];
}
+ (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completion
+ (void)presentViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)flag completion:(void (^)(void))completionBlock
{
[self.presentationViewController presentViewController:viewControllerToPresent animated:flag completion:completion];
[self.presentationViewController presentViewController:viewControllerToPresent animated:flag completion:completionBlock];
}
@end

View File

@ -52,7 +52,7 @@
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>1.3</string>
<string>1.3.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>

View File

@ -1,6 +1,6 @@
Package: com.opa334.trollstorehelper
Name: TrollStore Helper
Version: 1.3
Version: 1.3.1
Architecture: iphoneos-arm
Description: Helper utility to install and manage TrollStore!
Maintainer: opa334

View File

@ -50,7 +50,7 @@
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>1.3</string>
<string>1.3.1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>

View File

@ -412,22 +412,24 @@ extern UIImage* imageWithSize(UIImage* image, CGSize size);
return nil;
}
- (void)loadBasicInfoWithCompletion:(void (^)(NSError*))completionHandler
- (void)loadBasicInfoWithCompletion:(void (^)(NSError*))completionBlock
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
completionHandler([self sync_loadBasicInfo]);
if(completionBlock) completionBlock([self sync_loadBasicInfo]);
});
}
- (void)loadInfoWithCompletion:(void (^)(NSError*))completionHandler
- (void)loadInfoWithCompletion:(void (^)(NSError*))completionBlock
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
completionHandler([self sync_loadInfo]);
if(completionBlock) completionBlock([self sync_loadInfo]);
});
}
- (void)enumerateAllInfoDictionaries:(void (^)(NSString* key, NSObject* value, BOOL* stop))enumerateBlock
{
if(!enumerateBlock) return;
__block BOOL b_stop = NO;
[_cachedInfoDictionary enumerateKeysAndObjectsUsingBlock:^(NSString* key, NSObject* value, BOOL* stop) {
@ -455,6 +457,8 @@ extern UIImage* imageWithSize(UIImage* image, CGSize size);
- (void)enumerateAllEntitlements:(void (^)(NSString* key, NSObject* value, BOOL* stop))enumerateBlock
{
if(!enumerateBlock) return;
__block BOOL b_stop = NO;
[_cachedEntitlementsByBinarySubpaths enumerateKeysAndObjectsUsingBlock:^(NSString* binarySubpath, NSDictionary* binaryInfoDictionary, BOOL* stop_1)
@ -475,6 +479,8 @@ extern UIImage* imageWithSize(UIImage* image, CGSize size);
- (void)enumerateAvailableIcons:(void (^)(CGSize iconSize, NSUInteger iconScale, NSString* iconPath, BOOL* stop))enumerateBlock
{
if(!enumerateBlock) return;
if(_cachedInfoDictionary)
{
NSString* iconName = nil;

View File

@ -111,38 +111,43 @@ UIImage* imageWithSize(UIImage* image, CGSize size)
{
UIAction* installFromFileAction = [UIAction actionWithTitle:@"Install IPA File" image:[UIImage systemImageNamed:@"doc.badge.plus"] identifier:@"InstallIPAFile" handler:^(__kindof UIAction *action)
{
UTType* ipaType = [UTType typeWithFilenameExtension:@"ipa" conformingToType:UTTypeData];
UTType* tipaType = [UTType typeWithFilenameExtension:@"tipa" conformingToType:UTTypeData];
dispatch_async(dispatch_get_main_queue(), ^
{
UTType* ipaType = [UTType typeWithFilenameExtension:@"ipa" conformingToType:UTTypeData];
UTType* tipaType = [UTType typeWithFilenameExtension:@"tipa" conformingToType:UTTypeData];
UIDocumentPickerViewController* documentPickerVC = [[UIDocumentPickerViewController alloc] initForOpeningContentTypes:@[ipaType, tipaType]];
//UIDocumentPickerViewController* documentPickerVC = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"com.apple.itunes.ipa", @"com.opa334.trollstore.tipa"] inMode:UIDocumentPickerModeOpen];
documentPickerVC.allowsMultipleSelection = NO;
documentPickerVC.delegate = self;
UIDocumentPickerViewController* documentPickerVC = [[UIDocumentPickerViewController alloc] initForOpeningContentTypes:@[ipaType, tipaType]];
documentPickerVC.allowsMultipleSelection = NO;
documentPickerVC.delegate = self;
[TSPresentationDelegate presentViewController:documentPickerVC animated:YES completion:nil];
[TSPresentationDelegate presentViewController:documentPickerVC animated:YES completion:nil];
});
}];
UIAction* installFromURLAction = [UIAction actionWithTitle:@"Install from URL" image:[UIImage systemImageNamed:@"link.badge.plus"] identifier:@"InstallFromURL" handler:^(__kindof UIAction *action)
{
UIAlertController* installURLController = [UIAlertController alertControllerWithTitle:@"Install from URL" message:@"" preferredStyle:UIAlertControllerStyleAlert];
[installURLController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.placeholder = @"URL";
}];
UIAlertAction* installAction = [UIAlertAction actionWithTitle:@"Install" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action)
dispatch_async(dispatch_get_main_queue(), ^
{
NSString* URLString = installURLController.textFields.firstObject.text;
NSURL* remoteURL = [NSURL URLWithString:URLString];
UIAlertController* installURLController = [UIAlertController alertControllerWithTitle:@"Install from URL" message:@"" preferredStyle:UIAlertControllerStyleAlert];
[TSInstallationController handleAppInstallFromRemoteURL:remoteURL completion:nil];
}];
[installURLController addAction:installAction];
[installURLController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.placeholder = @"URL";
}];
UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil];
[installURLController addAction:cancelAction];
UIAlertAction* installAction = [UIAlertAction actionWithTitle:@"Install" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action)
{
NSString* URLString = installURLController.textFields.firstObject.text;
NSURL* remoteURL = [NSURL URLWithString:URLString];
[TSPresentationDelegate presentViewController:installURLController animated:YES completion:nil];
[TSInstallationController handleAppInstallFromRemoteURL:remoteURL completion:nil];
}];
[installURLController addAction:installAction];
UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil];
[installURLController addAction:cancelAction];
[TSPresentationDelegate presentViewController:installURLController animated:YES completion:nil];
});
}];
UIMenu* installMenu = [UIMenu menuWithChildren:@[installFromFileAction, installFromURLAction]];

View File

@ -93,7 +93,7 @@
UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction* action)
{
completionBlock(NO, nil);
if(completionBlock) completionBlock(NO, nil);
}];
[installAlert addAction:cancelAction];

View File

@ -1,6 +1,6 @@
Package: com.opa334.trollstore
Name: TrollStore
Version: 1.3
Version: 1.3.1
Architecture: iphoneos-arm
Description: An awesome application!
Maintainer: opa334