From e64ba6e4a8ef5df52535a5cafd7fd6cd2b052ce5 Mon Sep 17 00:00:00 2001 From: Ethan Arbuckle Date: Sun, 31 Mar 2024 02:37:34 -0700 Subject: [PATCH] working preferences --- Makefile | 2 +- carplayenableprefs/Makefile | 9 ++++++--- src/common.h | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3d677c9..a69c190 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,6 @@ test:: install.exec "cycript -p SpringBoard" < tests/springboard_tests.cy install.exec "cycript -p CarPlay" < tests/carplay_tests.cy -# SUBPROJECTS += carplayenableprefs +SUBPROJECTS += carplayenableprefs include $(THEOS_MAKE_PATH)/aggregate.mk diff --git a/carplayenableprefs/Makefile b/carplayenableprefs/Makefile index b7a441f..6d572c4 100644 --- a/carplayenableprefs/Makefile +++ b/carplayenableprefs/Makefile @@ -3,10 +3,12 @@ TARGET = iphone:clang:15.6:15.6 include $(THEOS)/makefiles/common.mk +THEOS_PACKAGE_SCHEME=rootless + BUNDLE_NAME = carplayenableprefs carplayenableprefs_FILES = $(wildcard *.m) ../src/CRPreferences.mm -carplayenableprefs_INSTALL_PATH = /Library/PreferenceBundles +carplayenableprefs_INSTALL_PATH = /var/jb/Library/PreferenceBundles carplayenableprefs_FRAMEWORKS = UIKit carplayenableprefs_PRIVATE_FRAMEWORKS = Preferences carplayenableprefs_CFLAGS = -fobjc-arc @@ -14,5 +16,6 @@ carplayenableprefs_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/carplayenableprefs.plist$(ECHO_END) + mkdir -p $(THEOS_STAGING_DIR)/var/jb/Library/PreferenceLoader/Preferences + cp entry.plist $(THEOS_STAGING_DIR)/var/jb/Library/PreferenceLoader/Preferences/carplayenableprefs.plist + diff --git a/src/common.h b/src/common.h index 065cbc5..43b1f99 100644 --- a/src/common.h +++ b/src/common.h @@ -45,7 +45,7 @@ __unused static void LogSelectorError(id object, SEL selector) { static char *kPropertyKey_didDrawPlaceholder; // Preferences -#define PREFERENCES_PLIST_PATH @"/var/mobile/Library/Preferences/com.carplayenable.preferences.plist" +#define PREFERENCES_PLIST_PATH @"/var/jb/Library/Preferences/com.carplayenable.preferences.plist" #define PREFERENCES_CHANGED_NOTIFICATION @"com.carplay.preferences.changed" #define PREFERENCES_APP_DATA_NOTIFICATION @"com.carplay.prefs.app_data" #define kPrefsAppDataRequesting @"Requesting"