Skip to content

Commit

Permalink
1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
opa334 committed Oct 30, 2022
1 parent ef6b701 commit ff0c2a2
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 38 deletions.
2 changes: 1 addition & 1 deletion RootHelper/control
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions RootHelper/entitlements.plist
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
11 changes: 4 additions & 7 deletions Shared/TSPresentationDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,20 @@ + (void)startActivity:(NSString*)activity
[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
2 changes: 1 addition & 1 deletion TrollHelper/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion TrollHelper/control
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion TrollStore/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
14 changes: 10 additions & 4 deletions TrollStore/TSAppInfo.m
Original file line number Diff line number Diff line change
Expand Up @@ -412,22 +412,24 @@ - (NSError*)sync_loadInfo
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) {
Expand Down Expand Up @@ -455,6 +457,8 @@ - (void)enumerateAllInfoDictionaries:(void (^)(NSString* key, NSObject* value, B

- (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)
Expand All @@ -475,6 +479,8 @@ - (void)enumerateAllEntitlements:(void (^)(NSString* key, NSObject* value, BOOL*

- (void)enumerateAvailableIcons:(void (^)(CGSize iconSize, NSUInteger iconScale, NSString* iconPath, BOOL* stop))enumerateBlock
{
if(!enumerateBlock) return;

if(_cachedInfoDictionary)
{
NSString* iconName = nil;
Expand Down
47 changes: 26 additions & 21 deletions TrollStore/TSAppTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,38 +111,43 @@ - (void)_setUpNavigationBar
{
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];
dispatch_async(dispatch_get_main_queue(), ^
{
UIAlertController* installURLController = [UIAlertController alertControllerWithTitle:@"Install from URL" message:@"" preferredStyle:UIAlertControllerStyleAlert];

[installURLController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.placeholder = @"URL";
}];
[installURLController addTextFieldWithConfigurationHandler:^(UITextField *textField) {
textField.placeholder = @"URL";
}];

UIAlertAction* installAction = [UIAlertAction actionWithTitle:@"Install" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action)
{
NSString* URLString = installURLController.textFields.firstObject.text;
NSURL* remoteURL = [NSURL URLWithString:URLString];
UIAlertAction* installAction = [UIAlertAction actionWithTitle:@"Install" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action)
{
NSString* URLString = installURLController.textFields.firstObject.text;
NSURL* remoteURL = [NSURL URLWithString:URLString];

[TSInstallationController handleAppInstallFromRemoteURL:remoteURL completion:nil];
}];
[installURLController addAction:installAction];
[TSInstallationController handleAppInstallFromRemoteURL:remoteURL completion:nil];
}];
[installURLController addAction:installAction];

UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil];
[installURLController addAction:cancelAction];
UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil];
[installURLController addAction:cancelAction];

[TSPresentationDelegate presentViewController:installURLController animated:YES completion:nil];
[TSPresentationDelegate presentViewController:installURLController animated:YES completion:nil];
});
}];

UIMenu* installMenu = [UIMenu menuWithChildren:@[installFromFileAction, installFromURLAction]];
Expand Down
2 changes: 1 addition & 1 deletion TrollStore/TSInstallationController.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ + (void)presentInstallationAlertForFile:(NSString*)pathToIPA completion:(void (^

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

Expand Down
2 changes: 1 addition & 1 deletion TrollStore/control
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ff0c2a2

Please sign in to comment.