mirror of
https://github.com/NohamR/TrollDecrypt-tvOS.git
synced 2026-07-11 22:41:37 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
491e53072f | ||
|
|
7449682883 | ||
|
|
46184fa020 |
@@ -18,7 +18,7 @@
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.1</string>
|
||||
<string>1.2</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||
|
||||
@@ -553,7 +553,7 @@ int find_off_cryptid(const char *filePath) {
|
||||
}
|
||||
|
||||
-(NSString *)IPAPath {
|
||||
return [NSString stringWithFormat:@"%@/%@_%@_decrypted.ipa", [self docPath], self.appName, self.appVersion];
|
||||
return [NSString stringWithFormat:@"%@/%@_%@_decrypted.tipa", [self docPath], self.appName, self.appVersion];
|
||||
}
|
||||
|
||||
-(void) createIPAFile:(pid_t)pid {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#import "TDFileManagerViewController.h"
|
||||
#import "TDUtils.h"
|
||||
#import "LSApplicationProxy+AltList.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@implementation TDFileManagerViewController
|
||||
|
||||
@@ -83,15 +85,49 @@
|
||||
return swipeActions;
|
||||
}
|
||||
|
||||
UIWindow *kw2 = NULL;
|
||||
UIAlertController *doneController2 = NULL;
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
NSString *file = self.fileList[indexPath.row];
|
||||
NSString *path = [docPath() stringByAppendingPathComponent:file];
|
||||
NSURL *url = [NSURL fileURLWithPath:path];
|
||||
|
||||
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[url] applicationActivities:nil];
|
||||
[self presentViewController:activityViewController animated:YES completion:nil];
|
||||
doneController2 = [UIAlertController alertControllerWithTitle:file message:[NSString stringWithFormat:@"Location:\n%@", path] preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Ok", @"Ok") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
[kw2 removeFromSuperview];
|
||||
kw2.hidden = YES;
|
||||
}];
|
||||
[doneController2 addAction:okAction];
|
||||
|
||||
UIAlertAction *openAction = [UIAlertAction actionWithTitle:@"Share IPA with Airdrop" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||
NSString *filePath = path;
|
||||
NSDictionary* airdropDictionary;
|
||||
NSBundle *bundle = [NSBundle bundleWithPath:@"/System/Library/PrivateFrameworks/Sharing.framework"];
|
||||
[bundle load];
|
||||
|
||||
NSString *suf = @"/System/Library/PrivateFrameworks/SharingUI.framework";
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:suf]){
|
||||
NSBundle *sharingUI = [NSBundle bundleWithPath:suf];
|
||||
[sharingUI load];
|
||||
}
|
||||
|
||||
NSURL *url = [NSURL fileURLWithPath:filePath];
|
||||
|
||||
id sharingView = [[objc_getClass("SFAirDropSharingViewControllerTV") alloc] initWithSharingItems:@[url]];
|
||||
[sharingView setCompletionHandler:^(NSError *error) {
|
||||
NSString *sender = airdropDictionary[@"sender"];
|
||||
if (sender) {
|
||||
id defaultWorkspace = [objc_getClass("LSApplicationWorkspace") defaultWorkspace];
|
||||
[defaultWorkspace performSelector:@selector(openApplicationWithBundleID:) withObject:(id)sender];
|
||||
}
|
||||
}];
|
||||
|
||||
[self presentViewController:sharingView animated:true completion:nil];
|
||||
}];
|
||||
[doneController2 addAction:openAction];
|
||||
|
||||
[self presentViewController:doneController2 animated:YES completion:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -48,7 +48,7 @@
|
||||
}
|
||||
|
||||
- (void)about:(id)sender {
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"TrollDecrypt" message:@"by fiore\nIcon by @super.user\nbfdecrypt by @bishopfox\ndumpdecrypted by @i0n1c\nUpdated for TrollStore by @wh1te4ever" preferredStyle:UIAlertControllerStyleAlert];
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"TrollDecrypt" message:@"by fiore\nIcon by @super.user\nbfdecrypt by @bishopfox\ndumpdecrypted by @i0n1c\nUpdated for TrollStore by @wh1te4ever\nPorting to tvOS by @straight-tamago" preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"Dismiss" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
@@ -43,3 +43,8 @@ NSString *docPath(void);
|
||||
void fetchLatestTrollDecryptVersion(void (^completionHandler)(NSString *version));
|
||||
void github_fetchLatedVersion(NSString *repo, void (^completionHandler)(NSString *latestVersion));
|
||||
NSString *trollDecryptVersion(void);
|
||||
|
||||
@interface SFAirDropSharingViewControllerTV : UIViewController
|
||||
-(id)initWithSharingItems:(id)arg1;
|
||||
-(void)setCompletionHandler:(void (^)(NSError *error))arg1;
|
||||
@end
|
||||
11
TDUtils.m
11
TDUtils.m
@@ -3,13 +3,6 @@
|
||||
#import "LSApplicationProxy+AltList.h"
|
||||
#import <objc/runtime.h>
|
||||
|
||||
@interface SFAirDropSharingViewControllerTV : UIViewController
|
||||
-(id)initWithSharingItems:(id)arg1;
|
||||
-(void)setCompletionHandler:(void (^)(NSError *error))arg1;
|
||||
@end
|
||||
|
||||
|
||||
|
||||
UIWindow *alertWindow = NULL;
|
||||
UIWindow *kw = NULL;
|
||||
UIViewController *root = NULL;
|
||||
@@ -257,7 +250,7 @@ NSArray *decryptedFileList(void) {
|
||||
|
||||
NSString *file;
|
||||
while (file = [directoryEnumerator nextObject]) {
|
||||
if ([[file pathExtension] isEqualToString:@"ipa"]) {
|
||||
if ([[file pathExtension] isEqualToString:@"ipa"] || [[file pathExtension] isEqualToString:@"tipa"]) {
|
||||
NSString *filePath = [[docPath() stringByAppendingPathComponent:file] stringByStandardizingPath];
|
||||
|
||||
NSDictionary *fileAttributes = [fileManager attributesOfItemAtPath:filePath error:nil];
|
||||
@@ -402,7 +395,7 @@ void github_fetchLatedVersion(NSString *repo, void (^completionHandler)(NSString
|
||||
}
|
||||
|
||||
void fetchLatestTrollDecryptVersion(void (^completionHandler)(NSString *version)) {
|
||||
github_fetchLatedVersion(@"donato-fiore/TrollDecrypt", completionHandler);
|
||||
github_fetchLatedVersion(@"straight-tamago/TrollDecrypt-tvOS", completionHandler);
|
||||
}
|
||||
|
||||
NSString *trollDecryptVersion(void) {
|
||||
|
||||
Reference in New Issue
Block a user