Skip to content

Commit

Permalink
working preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanArbuckle committed Mar 31, 2024
1 parent a3c69a6 commit e64ba6e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 6 additions & 3 deletions carplayenableprefs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ 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

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

2 changes: 1 addition & 1 deletion src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e64ba6e

Please sign in to comment.