diff --git a/AppInfo.m b/AppInfo.m index ce0e684..32175b8 100644 --- a/AppInfo.m +++ b/AppInfo.m @@ -75,7 +75,7 @@ - (UIImage*)icon { - (UIImage *)generateLiveContainerWrappedIcon { UIImage *icon = self.icon; - if ([NSUserDefaults.standardUserDefaults boolForKey:@"LCDontFrameShortcutIcons"]) { + if (![NSUserDefaults.standardUserDefaults boolForKey:@"LCFrameShortcutIcons"]) { return icon; } diff --git a/LCSettingsListController.m b/LCSettingsListController.m index 21dbdf4..e747761 100644 --- a/LCSettingsListController.m +++ b/LCSettingsListController.m @@ -4,29 +4,21 @@ @implementation LCSettingsListController -- (NSMutableArray*)specifiers { - if(!_specifiers) { - _specifiers = [NSMutableArray new]; - PSSpecifier* jitlessGroup = [PSSpecifier emptyGroupSpecifier]; - jitlessGroup.name = @"JIT-less"; - [jitlessGroup setProperty:@"JIT-less allows you to use LiveContainer without having to enable JIT. Requires SideStore." forKey:@"footerText"]; - [_specifiers addObject:jitlessGroup]; - - NSString *setupJITLessButtonName = LCUtils.certificatePassword ? @"Renew JIT-less certificate" : @"Setup JIT-less certificate"; - PSSpecifier* setupJITLessButton = [PSSpecifier preferenceSpecifierNamed:setupJITLessButtonName target:self set:nil get:nil detail:nil cell:PSButtonCell edit:nil]; - setupJITLessButton.identifier = @"setup-jitless"; - setupJITLessButton.buttonAction = @selector(setupJITLessPressed); - [_specifiers addObject:setupJITLessButton]; - - PSSpecifier* signTweaksButton = [PSSpecifier preferenceSpecifierNamed:@"Sign tweaks" target:self set:nil get:nil detail:nil cell:PSButtonCell edit:nil]; - signTweaksButton.identifier = @"sign-tweaks"; - [signTweaksButton setProperty:@(!!LCUtils.certificatePassword) forKey:@"enabled"]; - signTweaksButton.buttonAction = @selector(signTweaksPressed); - [_specifiers addObject:signTweaksButton]; +- (NSMutableArray *)specifiers { + if (!_specifiers) { + _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self bundle:NSBundle.mainBundle]; } + return _specifiers; } +- (void)loadView { + [super loadView]; + NSString *setupJITLessButtonName = LCUtils.certificatePassword ? @"Renew JIT-less certificate" : @"Setup JIT-less certificate"; + PSSpecifier *setupJITLessButton = [self specifierForID:@"setup-jitless"]; + setupJITLessButton.name = setupJITLessButtonName; +} + - (void)setupJITLessPressed { if (!LCUtils.isAppGroupSideStore) { [self showDialogTitle:@"Error" message:@"Unsupported installation method. Please use SideStore to setup this feature."]; @@ -43,8 +35,12 @@ - (void)setupJITLessPressed { [UIApplication.sharedApplication openURL:[NSURL URLWithString:[NSString stringWithFormat:@"sidestore://install?url=%@", url]] options:@{} completionHandler:nil]; } -- (void)signTweaksPressed { - +- (void)openSourceCode { + [UIApplication.sharedApplication openURL:[NSURL URLWithString:@"https://github.com/khanhduytran0/LiveContainer"] options:@{} completionHandler:nil]; +} + +- (void)openTwitter { + [UIApplication.sharedApplication openURL:[NSURL URLWithString:@"https://twitter.com/TranKha50277352"] options:@{} completionHandler:nil]; } @end diff --git a/LCUtils.m b/LCUtils.m index 3d4aceb..13dadab 100644 --- a/LCUtils.m +++ b/LCUtils.m @@ -73,7 +73,7 @@ + (BOOL)launchToGuestAppWithURL:(NSURL *)url { return [NSClassFromString(@"LCSharedUtils") launchToGuestAppWithURL:url]; } -#pragma mark Code sunning +#pragma mark Code signing + (void)removeCodeSignatureFromBundleURL:(NSURL *)appURL { int32_t cpusubtype; diff --git a/Resources/GitHub@2x.png b/Resources/GitHub@2x.png new file mode 100644 index 0000000..bc4a373 Binary files /dev/null and b/Resources/GitHub@2x.png differ diff --git a/Resources/GitHub@3x.png b/Resources/GitHub@3x.png new file mode 100644 index 0000000..9918941 Binary files /dev/null and b/Resources/GitHub@3x.png differ diff --git a/Resources/Icon@3x.png b/Resources/Icon@3x.png new file mode 100644 index 0000000..c5e3a7d Binary files /dev/null and b/Resources/Icon@3x.png differ diff --git a/Resources/Root.plist b/Resources/Root.plist new file mode 100644 index 0000000..11e1f70 --- /dev/null +++ b/Resources/Root.plist @@ -0,0 +1,73 @@ + + + + + items + + + cell + PSGroupCell + footerText + JIT-less allows you to use LiveContainer without having to enable JIT. Requires SideStore. + label + JIT-less + + + action + setupJITLessPressed + cell + PSButtonCell + id + setup-jitless + label + Setup JIT-less + + + cell + PSGroupCell + label + Miscellaneous + + + cell + PSSwitchCell + default + + defaults + com.kdt.livecontainer + key + LCFrameShortcutIcons + label + Frame shortcut icon + + + cell + PSGroupCell + label + About me + + + action + openSourceCode + cell + PSButtonCell + icon + GitHub.png + label + khanhduytran0/LiveContainer + + + action + openTwitter + cell + PSButtonCell + icon + Twitter.png + label + @TranKha50277352 + + + title + Settings + + diff --git a/Resources/Twitter@2x.png b/Resources/Twitter@2x.png new file mode 100644 index 0000000..72cf57e Binary files /dev/null and b/Resources/Twitter@2x.png differ diff --git a/Resources/Twitter@3x.png b/Resources/Twitter@3x.png new file mode 100644 index 0000000..ed324ce Binary files /dev/null and b/Resources/Twitter@3x.png differ