mirror of
https://github.com/NohamR/TrollDecrypt-tvOS.git
synced 2026-07-11 19:10:05 +00:00
ふぁいる
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1.1</string>
|
<string>1.2</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>LSSupportsOpeningDocumentsInPlace</key>
|
<key>LSSupportsOpeningDocumentsInPlace</key>
|
||||||
|
|||||||
@@ -553,7 +553,7 @@ int find_off_cryptid(const char *filePath) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-(NSString *)IPAPath {
|
-(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 {
|
-(void) createIPAFile:(pid_t)pid {
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#import "TDFileManagerViewController.h"
|
#import "TDFileManagerViewController.h"
|
||||||
#import "TDUtils.h"
|
#import "TDUtils.h"
|
||||||
|
#import "LSApplicationProxy+AltList.h"
|
||||||
|
#import <objc/runtime.h>
|
||||||
|
|
||||||
@implementation TDFileManagerViewController
|
@implementation TDFileManagerViewController
|
||||||
|
|
||||||
@@ -83,15 +85,49 @@
|
|||||||
return swipeActions;
|
return swipeActions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UIWindow *kw2 = NULL;
|
||||||
|
UIAlertController *doneController2 = NULL;
|
||||||
|
|
||||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||||
NSString *file = self.fileList[indexPath.row];
|
NSString *file = self.fileList[indexPath.row];
|
||||||
NSString *path = [docPath() stringByAppendingPathComponent:file];
|
NSString *path = [docPath() stringByAppendingPathComponent:file];
|
||||||
NSURL *url = [NSURL fileURLWithPath:path];
|
|
||||||
|
|
||||||
UIActivityViewController *activityViewController = [[UIActivityViewController alloc] initWithActivityItems:@[url] applicationActivities:nil];
|
doneController2 = [UIAlertController alertControllerWithTitle:file message:[NSString stringWithFormat:@"Location:\n%@", path] preferredStyle:UIAlertControllerStyleAlert];
|
||||||
[self presentViewController:activityViewController animated:YES completion:nil];
|
|
||||||
|
|
||||||
[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
|
@end
|
||||||
@@ -42,4 +42,9 @@ NSArray *decryptedFileList(void);
|
|||||||
NSString *docPath(void);
|
NSString *docPath(void);
|
||||||
void fetchLatestTrollDecryptVersion(void (^completionHandler)(NSString *version));
|
void fetchLatestTrollDecryptVersion(void (^completionHandler)(NSString *version));
|
||||||
void github_fetchLatedVersion(NSString *repo, void (^completionHandler)(NSString *latestVersion));
|
void github_fetchLatedVersion(NSString *repo, void (^completionHandler)(NSString *latestVersion));
|
||||||
NSString *trollDecryptVersion(void);
|
NSString *trollDecryptVersion(void);
|
||||||
|
|
||||||
|
@interface SFAirDropSharingViewControllerTV : UIViewController
|
||||||
|
-(id)initWithSharingItems:(id)arg1;
|
||||||
|
-(void)setCompletionHandler:(void (^)(NSError *error))arg1;
|
||||||
|
@end
|
||||||
@@ -3,13 +3,6 @@
|
|||||||
#import "LSApplicationProxy+AltList.h"
|
#import "LSApplicationProxy+AltList.h"
|
||||||
#import <objc/runtime.h>
|
#import <objc/runtime.h>
|
||||||
|
|
||||||
@interface SFAirDropSharingViewControllerTV : UIViewController
|
|
||||||
-(id)initWithSharingItems:(id)arg1;
|
|
||||||
-(void)setCompletionHandler:(void (^)(NSError *error))arg1;
|
|
||||||
@end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UIWindow *alertWindow = NULL;
|
UIWindow *alertWindow = NULL;
|
||||||
UIWindow *kw = NULL;
|
UIWindow *kw = NULL;
|
||||||
UIViewController *root = NULL;
|
UIViewController *root = NULL;
|
||||||
@@ -402,7 +395,7 @@ void github_fetchLatedVersion(NSString *repo, void (^completionHandler)(NSString
|
|||||||
}
|
}
|
||||||
|
|
||||||
void fetchLatestTrollDecryptVersion(void (^completionHandler)(NSString *version)) {
|
void fetchLatestTrollDecryptVersion(void (^completionHandler)(NSString *version)) {
|
||||||
github_fetchLatedVersion(@"donato-fiore/TrollDecrypt", completionHandler);
|
github_fetchLatedVersion(@"straight-tamago/TrollDecrypt-tvOS", completionHandler);
|
||||||
}
|
}
|
||||||
|
|
||||||
NSString *trollDecryptVersion(void) {
|
NSString *trollDecryptVersion(void) {
|
||||||
|
|||||||
Reference in New Issue
Block a user