Remove prefs for now
This commit is contained in:
@ -8,5 +8,5 @@ Author: mac-user669
|
|||||||
Name: ZenithDark
|
Name: ZenithDark
|
||||||
Sileodepiction: https://raw.githubusercontent.com/mac-user669/repo/master/sileodepictions/ZenithDark.json
|
Sileodepiction: https://raw.githubusercontent.com/mac-user669/repo/master/sileodepictions/ZenithDark.json
|
||||||
Depiction: https://mac-user669.github.io/repo/depictions/?p=com.mac-user669.zenithdark/
|
Depiction: https://mac-user669.github.io/repo/depictions/?p=com.mac-user669.zenithdark/
|
||||||
Version: 1.0
|
Version: 1.0-1+debug
|
||||||
Installed-Size: 344
|
Installed-Size: 344
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
./packages/com.mac-user669.zenithdark_1.0_iphoneos-arm.deb
|
./packages/com.mac-user669.zenithdark_1.0-1+debug_iphoneos-arm.deb
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -12,20 +12,6 @@
|
|||||||
|
|
||||||
#import "ZenithDark.h"
|
#import "ZenithDark.h"
|
||||||
|
|
||||||
static BOOL enabled;
|
|
||||||
static void loadPrefs() {
|
|
||||||
static NSMutableDictionary *settings;
|
|
||||||
|
|
||||||
CFArrayRef keyList = CFPreferencesCopyKeyList(CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
|
|
||||||
if (keyList) {
|
|
||||||
settings = (NSMutableDictionary *)CFBridgingRelease(CFPreferencesCopyMultiple(keyList, CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost));
|
|
||||||
CFRelease(keyList);
|
|
||||||
} else {
|
|
||||||
settings = [NSMutableDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.mac-user669.zenithdarkprefs.plist"];
|
|
||||||
}
|
|
||||||
|
|
||||||
enabled = [([settings objectForKey:@"enabled"] ? [settings objectForKey:@"enabled"] : @(YES)) boolValue];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -52,11 +38,10 @@ static void loadPrefs() {
|
|||||||
@class ZNGrabberAccessoryView;
|
@class ZNGrabberAccessoryView;
|
||||||
static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *);
|
static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *);
|
||||||
|
|
||||||
#line 30 "Tweak.xm"
|
#line 16 "Tweak.xm"
|
||||||
|
|
||||||
|
|
||||||
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UITraitCollection * previousTraitCollection) {
|
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UITraitCollection * previousTraitCollection) {
|
||||||
if (enabled) {
|
|
||||||
_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(self, _cmd, previousTraitCollection);
|
_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(self, _cmd, previousTraitCollection);
|
||||||
if (@available(iOS 13, *)) {
|
if (@available(iOS 13, *)) {
|
||||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
@ -67,14 +52,11 @@ static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidCh
|
|||||||
[self setBackgroundColor:kLightModeColor];
|
[self setBackgroundColor:kLightModeColor];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(self, _cmd, previousTraitCollection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UIColor * backgroundColor) {
|
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UIColor * backgroundColor) {
|
||||||
if (enabled) {
|
|
||||||
|
|
||||||
if (@available(iOS 13, *)) {
|
if (@available(iOS 13, *)) {
|
||||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
@ -85,8 +67,6 @@ static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(
|
|||||||
_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(self, _cmd, backgroundColor);
|
_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(self, _cmd, backgroundColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(self, _cmd, backgroundColor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,9 +75,8 @@ static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static __attribute__((constructor)) void _logosLocalCtor_7f270ec4(int __unused argc, char __unused **argv, char __unused **envp) {
|
static __attribute__((constructor)) void _logosLocalCtor_da6b7450(int __unused argc, char __unused **argv, char __unused **envp) {
|
||||||
|
|
||||||
loadPrefs();
|
|
||||||
|
|
||||||
|
|
||||||
dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW);
|
dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW);
|
||||||
@ -105,4 +84,4 @@ dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW);
|
|||||||
}
|
}
|
||||||
static __attribute__((constructor)) void _logosLocalInit() {
|
static __attribute__((constructor)) void _logosLocalInit() {
|
||||||
{Class _logos_class$_ungrouped$ZNGrabberAccessoryView = objc_getClass("ZNGrabberAccessoryView"); MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(traitCollectionDidChange:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$);MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(setBackgroundColor:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$);} }
|
{Class _logos_class$_ungrouped$ZNGrabberAccessoryView = objc_getClass("ZNGrabberAccessoryView"); MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(traitCollectionDidChange:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$);MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(setBackgroundColor:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$);} }
|
||||||
#line 80 "Tweak.xm"
|
#line 59 "Tweak.xm"
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -12,20 +12,6 @@
|
|||||||
|
|
||||||
#import "ZenithDark.h"
|
#import "ZenithDark.h"
|
||||||
|
|
||||||
static BOOL enabled;
|
|
||||||
static void loadPrefs() {
|
|
||||||
static NSMutableDictionary *settings;
|
|
||||||
|
|
||||||
CFArrayRef keyList = CFPreferencesCopyKeyList(CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
|
|
||||||
if (keyList) {
|
|
||||||
settings = (NSMutableDictionary *)CFBridgingRelease(CFPreferencesCopyMultiple(keyList, CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost));
|
|
||||||
CFRelease(keyList);
|
|
||||||
} else {
|
|
||||||
settings = [NSMutableDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.mac-user669.zenithdarkprefs.plist"];
|
|
||||||
}
|
|
||||||
|
|
||||||
enabled = [([settings objectForKey:@"enabled"] ? [settings objectForKey:@"enabled"] : @(YES)) boolValue];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -52,11 +38,10 @@ static void loadPrefs() {
|
|||||||
@class ZNGrabberAccessoryView;
|
@class ZNGrabberAccessoryView;
|
||||||
static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *);
|
static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *);
|
||||||
|
|
||||||
#line 30 "Tweak.xm"
|
#line 16 "Tweak.xm"
|
||||||
|
|
||||||
|
|
||||||
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UITraitCollection * previousTraitCollection) {
|
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UITraitCollection * previousTraitCollection) {
|
||||||
if (enabled) {
|
|
||||||
_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(self, _cmd, previousTraitCollection);
|
_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(self, _cmd, previousTraitCollection);
|
||||||
if (@available(iOS 13, *)) {
|
if (@available(iOS 13, *)) {
|
||||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
@ -67,14 +52,11 @@ static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidCh
|
|||||||
[self setBackgroundColor:kLightModeColor];
|
[self setBackgroundColor:kLightModeColor];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(self, _cmd, previousTraitCollection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UIColor * backgroundColor) {
|
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UIColor * backgroundColor) {
|
||||||
if (enabled) {
|
|
||||||
|
|
||||||
if (@available(iOS 13, *)) {
|
if (@available(iOS 13, *)) {
|
||||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
@ -85,8 +67,6 @@ static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(
|
|||||||
_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(self, _cmd, backgroundColor);
|
_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(self, _cmd, backgroundColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(self, _cmd, backgroundColor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,9 +75,8 @@ static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static __attribute__((constructor)) void _logosLocalCtor_7f270ec4(int __unused argc, char __unused **argv, char __unused **envp) {
|
static __attribute__((constructor)) void _logosLocalCtor_da6b7450(int __unused argc, char __unused **argv, char __unused **envp) {
|
||||||
|
|
||||||
loadPrefs();
|
|
||||||
|
|
||||||
|
|
||||||
dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW);
|
dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW);
|
||||||
@ -105,4 +84,4 @@ dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW);
|
|||||||
}
|
}
|
||||||
static __attribute__((constructor)) void _logosLocalInit() {
|
static __attribute__((constructor)) void _logosLocalInit() {
|
||||||
{Class _logos_class$_ungrouped$ZNGrabberAccessoryView = objc_getClass("ZNGrabberAccessoryView"); MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(traitCollectionDidChange:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$);MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(setBackgroundColor:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$);} }
|
{Class _logos_class$_ungrouped$ZNGrabberAccessoryView = objc_getClass("ZNGrabberAccessoryView"); MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(traitCollectionDidChange:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$);MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(setBackgroundColor:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$);} }
|
||||||
#line 80 "Tweak.xm"
|
#line 59 "Tweak.xm"
|
||||||
|
Binary file not shown.
Binary file not shown.
0
.theos/obj/debug/.stamp
Normal file
0
.theos/obj/debug/.stamp
Normal file
BIN
.theos/obj/debug/ZenithDark.dylib
Executable file
BIN
.theos/obj/debug/ZenithDark.dylib
Executable file
Binary file not shown.
BIN
.theos/obj/debug/ZenithDarkPrefs.bundle/ZenithDarkPrefs
Executable file
BIN
.theos/obj/debug/ZenithDarkPrefs.bundle/ZenithDarkPrefs
Executable file
Binary file not shown.
20
.theos/obj/debug/arm64/Tweak.xm.30dd847b.Td
Normal file
20
.theos/obj/debug/arm64/Tweak.xm.30dd847b.Td
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64/Tweak.xm.30dd847b.o: \
|
||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64/Tweak.xm.mm \
|
||||||
|
/Users/cooperhull/theos/Prefix.pch \
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/BackwardsCompat.h \
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/IOSMacros.h \
|
||||||
|
/Users/cooperhull/theos/include/HBLog.h \
|
||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/ZenithDark.h \
|
||||||
|
/Users/cooperhull/theos/include/substrate.h
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/Prefix.pch:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/BackwardsCompat.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/IOSMacros.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/HBLog.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/ZenithDark.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/substrate.h:
|
116
.theos/obj/debug/arm64/Tweak.xm.mm
Normal file
116
.theos/obj/debug/arm64/Tweak.xm.mm
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
#line 1 "Tweak.xm"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#import "ZenithDark.h"
|
||||||
|
|
||||||
|
static BOOL enabled;
|
||||||
|
|
||||||
|
|
||||||
|
static void refreshPrefs() {
|
||||||
|
CFArrayRef keyList = CFPreferencesCopyKeyList(CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
|
||||||
|
if (keyList) {
|
||||||
|
settings = (NSMutableDictionary *)CFBridgingRelease(CFPreferencesCopyMultiple(keyList, CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost));
|
||||||
|
CFRelease(keyList);
|
||||||
|
} else {
|
||||||
|
settings = nil;
|
||||||
|
}
|
||||||
|
if (!settings) {
|
||||||
|
settings = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.mac-user669.zenithdarkprefs.plist"];
|
||||||
|
}
|
||||||
|
|
||||||
|
enabled = [([settings objectForKey:@"enabled"] ?: @(YES)) boolValue];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#include <substrate.h>
|
||||||
|
#if defined(__clang__)
|
||||||
|
#if __has_feature(objc_arc)
|
||||||
|
#define _LOGOS_SELF_TYPE_NORMAL __unsafe_unretained
|
||||||
|
#define _LOGOS_SELF_TYPE_INIT __attribute__((ns_consumed))
|
||||||
|
#define _LOGOS_SELF_CONST const
|
||||||
|
#define _LOGOS_RETURN_RETAINED __attribute__((ns_returns_retained))
|
||||||
|
#else
|
||||||
|
#define _LOGOS_SELF_TYPE_NORMAL
|
||||||
|
#define _LOGOS_SELF_TYPE_INIT
|
||||||
|
#define _LOGOS_SELF_CONST
|
||||||
|
#define _LOGOS_RETURN_RETAINED
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define _LOGOS_SELF_TYPE_NORMAL
|
||||||
|
#define _LOGOS_SELF_TYPE_INIT
|
||||||
|
#define _LOGOS_SELF_CONST
|
||||||
|
#define _LOGOS_RETURN_RETAINED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@class ZNGrabberAccessoryView;
|
||||||
|
static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UITraitCollection *); static void (*_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$)(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *); static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST, SEL, UIColor *);
|
||||||
|
|
||||||
|
#line 34 "Tweak.xm"
|
||||||
|
|
||||||
|
|
||||||
|
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UITraitCollection * previousTraitCollection) {
|
||||||
|
if(enabled){
|
||||||
|
_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(self, _cmd, previousTraitCollection);
|
||||||
|
if (@available(iOS 13, *)) {
|
||||||
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
|
[self setBackgroundColor:kDarkModeColor];
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
[self setBackgroundColor:kLightModeColor];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$(self, _cmd, previousTraitCollection);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void _logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(_LOGOS_SELF_TYPE_NORMAL ZNGrabberAccessoryView* _LOGOS_SELF_CONST __unused self, SEL __unused _cmd, UIColor * backgroundColor) {
|
||||||
|
if(enabled){
|
||||||
|
|
||||||
|
|
||||||
|
if (@available(iOS 13, *)) {
|
||||||
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
|
_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(self, _cmd, kDarkModeColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(self, _cmd, backgroundColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$(self, _cmd, backgroundColor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static __attribute__((constructor)) void _logosLocalCtor_16c0be02(int __unused argc, char __unused **argv, char __unused **envp) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW);
|
||||||
|
|
||||||
|
}
|
||||||
|
static __attribute__((constructor)) void _logosLocalInit() {
|
||||||
|
{Class _logos_class$_ungrouped$ZNGrabberAccessoryView = objc_getClass("ZNGrabberAccessoryView"); MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(traitCollectionDidChange:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$traitCollectionDidChange$);MSHookMessageEx(_logos_class$_ungrouped$ZNGrabberAccessoryView, @selector(setBackgroundColor:), (IMP)&_logos_method$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$, (IMP*)&_logos_orig$_ungrouped$ZNGrabberAccessoryView$setBackgroundColor$);} }
|
||||||
|
#line 88 "Tweak.xm"
|
BIN
.theos/obj/debug/arm64/ZenithDark.dylib
Executable file
BIN
.theos/obj/debug/arm64/ZenithDark.dylib
Executable file
Binary file not shown.
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.apple.xcode.dsym.ZenithDark.dylib</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>dSYM</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
BIN
.theos/obj/debug/arm64/ZenithDarkPrefs.bundle/ZenithDarkPrefs
Executable file
BIN
.theos/obj/debug/arm64/ZenithDarkPrefs.bundle/ZenithDarkPrefs
Executable file
Binary file not shown.
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.apple.xcode.dsym.ZenithDarkPrefs</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>dSYM</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
@ -0,0 +1,21 @@
|
|||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64/ZnthDrkRootListController.m.0490b1f0.o: \
|
||||||
|
ZnthDrkRootListController.m /Users/cooperhull/theos/Prefix.pch \
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/BackwardsCompat.h \
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/IOSMacros.h \
|
||||||
|
/Users/cooperhull/theos/include/HBLog.h ZnthDrkRootListController.h \
|
||||||
|
/Users/cooperhull/theos/include/Preferences/PSListController.h \
|
||||||
|
/Users/cooperhull/theos/include/Preferences/PSViewController.h
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/Prefix.pch:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/BackwardsCompat.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/IOSMacros.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/HBLog.h:
|
||||||
|
|
||||||
|
ZnthDrkRootListController.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/Preferences/PSListController.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/Preferences/PSViewController.h:
|
BIN
.theos/obj/debug/arm64/ZnthDrkRootListController.m.0490b1f0.o
Normal file
BIN
.theos/obj/debug/arm64/ZnthDrkRootListController.m.0490b1f0.o
Normal file
Binary file not shown.
20
.theos/obj/debug/arm64e/Tweak.xm.9a3df4bf.Td
Normal file
20
.theos/obj/debug/arm64e/Tweak.xm.9a3df4bf.Td
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64e/Tweak.xm.9a3df4bf.o: \
|
||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64e/Tweak.xm.mm \
|
||||||
|
/Users/cooperhull/theos/Prefix.pch \
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/BackwardsCompat.h \
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/IOSMacros.h \
|
||||||
|
/Users/cooperhull/theos/include/HBLog.h \
|
||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/ZenithDark.h \
|
||||||
|
/Users/cooperhull/theos/include/substrate.h
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/Prefix.pch:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/BackwardsCompat.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/IOSMacros.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/HBLog.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/ZenithDark.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/substrate.h:
|
BIN
.theos/obj/debug/arm64e/Tweak.xm.9a3df4bf.o
Normal file
BIN
.theos/obj/debug/arm64e/Tweak.xm.9a3df4bf.o
Normal file
Binary file not shown.
BIN
.theos/obj/debug/arm64e/ZenithDark.dylib
Executable file
BIN
.theos/obj/debug/arm64e/ZenithDark.dylib
Executable file
Binary file not shown.
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.apple.xcode.dsym.ZenithDark.dylib</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>dSYM</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
BIN
.theos/obj/debug/arm64e/ZenithDarkPrefs.bundle/ZenithDarkPrefs
Executable file
BIN
.theos/obj/debug/arm64e/ZenithDarkPrefs.bundle/ZenithDarkPrefs
Executable file
Binary file not shown.
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string>com.apple.xcode.dsym.ZenithDarkPrefs</string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>dSYM</string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>1.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
@ -0,0 +1,21 @@
|
|||||||
|
/Users/cooperhull/Desktop/Tweaks/ZenithDark/.theos/obj/debug/arm64e/ZnthDrkRootListController.m.55b1348e.o: \
|
||||||
|
ZnthDrkRootListController.m /Users/cooperhull/theos/Prefix.pch \
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/BackwardsCompat.h \
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/IOSMacros.h \
|
||||||
|
/Users/cooperhull/theos/include/HBLog.h ZnthDrkRootListController.h \
|
||||||
|
/Users/cooperhull/theos/include/Preferences/PSListController.h \
|
||||||
|
/Users/cooperhull/theos/include/Preferences/PSViewController.h
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/Prefix.pch:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/BackwardsCompat.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/_Prefix/IOSMacros.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/HBLog.h:
|
||||||
|
|
||||||
|
ZnthDrkRootListController.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/Preferences/PSListController.h:
|
||||||
|
|
||||||
|
/Users/cooperhull/theos/include/Preferences/PSViewController.h:
|
BIN
.theos/obj/debug/arm64e/ZnthDrkRootListController.m.55b1348e.o
Normal file
BIN
.theos/obj/debug/arm64e/ZnthDrkRootListController.m.55b1348e.o
Normal file
Binary file not shown.
1
.theos/packages/com.mac-user669.zenithdark-1.0
Normal file
1
.theos/packages/com.mac-user669.zenithdark-1.0
Normal file
@ -0,0 +1 @@
|
|||||||
|
1
|
3
Makefile
3
Makefile
@ -1,7 +1,6 @@
|
|||||||
ARCHS = arm64 arm64e
|
ARCHS = arm64 arm64e
|
||||||
SDK = iPhoneOS13.0
|
SDK = iPhoneOS13.0
|
||||||
FINALPACKAGE = 1
|
FINALPACKAGE = 1
|
||||||
export TARGET = iphone:clang:13.0:latest
|
|
||||||
|
|
||||||
include $(THEOS)/makefiles/common.mk
|
include $(THEOS)/makefiles/common.mk
|
||||||
|
|
||||||
@ -15,5 +14,3 @@ include $(THEOS_MAKE_PATH)/tweak.mk
|
|||||||
|
|
||||||
after-install::
|
after-install::
|
||||||
install.exec "sbreload"
|
install.exec "sbreload"
|
||||||
SUBPROJECTS += zenithdarkprefs
|
|
||||||
include $(THEOS_MAKE_PATH)/aggregate.mk
|
|
||||||
|
32
Tweak.xm
32
Tweak.xm
@ -1,36 +1,17 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
Dark Mode for Zenith's Grabber view!
|
Dark Mode for Zenith's Grabber view!
|
||||||
Copyright 2020 J.K. Hayslip (@iKilledAppl3) & ToxicAppl3 INSDC/iKilledAppl3 LLC.
|
Copyright 2020 J.K. Hayslip (@iKilledAppl3) & ToxicAppl3 INSDC/iKilledAppl3 LLC.
|
||||||
All code was written for learning purposes and credit must be given to the original author.
|
All code was written for learning purposes and credit must be given to the original author.
|
||||||
|
|
||||||
Written for Cooper Hull, @(mac-user669).
|
Written for Cooper Hull, @(mac-user669).
|
||||||
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "ZenithDark.h"
|
#import "ZenithDark.h"
|
||||||
|
|
||||||
static BOOL enabled;
|
|
||||||
static void loadPrefs() {
|
|
||||||
static NSMutableDictionary *settings;
|
|
||||||
|
|
||||||
CFArrayRef keyList = CFPreferencesCopyKeyList(CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
|
|
||||||
if (keyList) {
|
|
||||||
settings = (NSMutableDictionary *)CFBridgingRelease(CFPreferencesCopyMultiple(keyList, CFSTR("com.mac-user669.zenithdarkprefs"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost));
|
|
||||||
CFRelease(keyList);
|
|
||||||
} else {
|
|
||||||
settings = [NSMutableDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/com.mac-user669.zenithdarkprefs.plist"];
|
|
||||||
}
|
|
||||||
|
|
||||||
enabled = [([settings objectForKey:@"enabled"] ? [settings objectForKey:@"enabled"] : @(YES)) boolValue];
|
|
||||||
}
|
|
||||||
|
|
||||||
// We then hook the class in this case Zenith's grabber view is called “ZNGrabberAccessoryView”
|
// We then hook the class in this case Zenith's grabber view is called “ZNGrabberAccessoryView”
|
||||||
%hook ZNGrabberAccessoryView
|
%hook ZNGrabberAccessoryView
|
||||||
// this is called when iOS 13's dark mode is enabled!
|
|
||||||
|
// this is called when iOS 13's dark mode is enabled!
|
||||||
-(void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
-(void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection {
|
||||||
if (enabled) {
|
|
||||||
%orig(previousTraitCollection);
|
%orig(previousTraitCollection);
|
||||||
if (@available(iOS 13, *)) {
|
if (@available(iOS 13, *)) {
|
||||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
@ -41,14 +22,11 @@ static void loadPrefs() {
|
|||||||
[self setBackgroundColor:kLightModeColor];
|
[self setBackgroundColor:kLightModeColor];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
%orig;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// the method we modify is this method that is called from UIImageView to set the backgroundColor of the image view.
|
// the method we modify is this method that is called from UIImageView to set the backgroundColor of the image view.
|
||||||
// Since the grabber view is of type UIImageView we can modify this method :)
|
// Since the grabber view is of type UIImageView we can modify this method :)
|
||||||
-(void)setBackgroundColor:(UIColor *)backgroundColor {
|
-(void)setBackgroundColor:(UIColor *)backgroundColor {
|
||||||
if (enabled) {
|
|
||||||
// by default have our tweak overide this.
|
// by default have our tweak overide this.
|
||||||
if (@available(iOS 13, *)) {
|
if (@available(iOS 13, *)) {
|
||||||
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
if (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
||||||
@ -59,20 +37,14 @@ static void loadPrefs() {
|
|||||||
%orig;
|
%orig;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
%orig;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// we need to make sure we tell theos that we are finished hooking this class not doing so with cause the end of the world :P
|
// we need to make sure we tell theos that we are finished hooking this class not doing so with cause the end of the world :P
|
||||||
%end
|
%end
|
||||||
|
|
||||||
|
|
||||||
// our constructor
|
// our constructor
|
||||||
%ctor {
|
%ctor {
|
||||||
|
|
||||||
loadPrefs();
|
|
||||||
|
|
||||||
// We use this to make sure we load Zenith's dynamic library at runtime so we can modify it with our tweak.
|
// We use this to make sure we load Zenith's dynamic library at runtime so we can modify it with our tweak.
|
||||||
dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW);
|
dlopen ("/Library/MobileSubstrate/DynamicLibraries/Zenith.dylib", RTLD_NOW);
|
||||||
|
|
||||||
|
BIN
packages/com.mac-user669.zenithdark_1.0-1+debug_iphoneos-arm.deb
Normal file
BIN
packages/com.mac-user669.zenithdark_1.0-1+debug_iphoneos-arm.deb
Normal file
Binary file not shown.
Binary file not shown.
@ -1,17 +0,0 @@
|
|||||||
include $(THEOS)/makefiles/common.mk
|
|
||||||
|
|
||||||
ARCHS = arm64 arm64e
|
|
||||||
export TARGET = iphone:clang:13.0:latest
|
|
||||||
BUNDLE_NAME = ZenithDarkPrefs
|
|
||||||
|
|
||||||
ZenithDarkPrefs_FILES = ZnthDrkRootListController.m
|
|
||||||
ZenithDarkPrefs_INSTALL_PATH = /Library/PreferenceBundles
|
|
||||||
ZenithDarkPrefs_FRAMEWORKS = UIKit
|
|
||||||
ZenithDarkPrefs_PRIVATE_FRAMEWORKS = Preferences
|
|
||||||
ZenithDarkPrefs_CFLAGS = -fobjc-arc
|
|
||||||
|
|
||||||
include $(THEOS_MAKE_PATH)/bundle.mk
|
|
||||||
|
|
||||||
internal-stage::
|
|
||||||
$(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END)
|
|
||||||
$(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/ZenithDarkPrefs.plist$(ECHO_END)
|
|
@ -1,5 +0,0 @@
|
|||||||
#import <Preferences/PSListController.h>
|
|
||||||
|
|
||||||
@interface ZnthDrkRootListController : PSListController
|
|
||||||
|
|
||||||
@end
|
|
@ -1,40 +0,0 @@
|
|||||||
#import "ZnthDrkRootListController.h"
|
|
||||||
#import <spawn.h>
|
|
||||||
@implementation ZnthDrkRootListController
|
|
||||||
|
|
||||||
- (void)viewWillAppear:(BOOL)animated {
|
|
||||||
[super viewWillAppear:animated];
|
|
||||||
UIBarButtonItem *applyButton = [[UIBarButtonItem alloc] initWithTitle:@"Apply" style:UIBarButtonItemStylePlain target:self action:@selector(respringDevice)];
|
|
||||||
self.navigationItem.rightBarButtonItem = applyButton;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSArray *)specifiers {
|
|
||||||
if (!_specifiers) {
|
|
||||||
_specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
return _specifiers;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) respringDevice {
|
|
||||||
UIAlertController *confirmRespringAlert = [UIAlertController alertControllerWithTitle:@"Apply settings?" message:@"This will respring your device" preferredStyle:UIAlertControllerStyleAlert];
|
|
||||||
UIAlertAction *confirm = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
|
||||||
pid_t pid;
|
|
||||||
const char *argv[] = {"sbreload", NULL};
|
|
||||||
posix_spawn(&pid, "/usr/bin/sbreload", NULL, NULL, (char* const*)argv, NULL);
|
|
||||||
}];
|
|
||||||
|
|
||||||
UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil];
|
|
||||||
|
|
||||||
[confirmRespringAlert addAction:cancel];
|
|
||||||
[confirmRespringAlert addAction:confirm];
|
|
||||||
|
|
||||||
[self presentViewController:confirmRespringAlert animated:YES completion:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
-(void)openTwitter {
|
|
||||||
NSURL *twitter = [NSURL URLWithString:@"https://twitter.com/mac_user669"];
|
|
||||||
[[UIApplication sharedApplication] openURL:twitter options:@{} completionHandler:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>entry</key>
|
|
||||||
<dict>
|
|
||||||
<key>bundle</key>
|
|
||||||
<string>ZenithDarkPrefs</string>
|
|
||||||
<key>cell</key>
|
|
||||||
<string>PSLinkCell</string>
|
|
||||||
<key>detail</key>
|
|
||||||
<string>ZnthDrkRootListController</string>
|
|
||||||
<key>icon</key>
|
|
||||||
<string>icon.png</string>
|
|
||||||
<key>isController</key>
|
|
||||||
<true/>
|
|
||||||
<key>label</key>
|
|
||||||
<string>ZenithDarkPrefs</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
Reference in New Issue
Block a user