Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
added rootless support
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandra authored and Alexandra committed May 16, 2023
1 parent 3ca9c9f commit 9d86374
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ SUBPROJECTS = Tweak/Core Tweak/Helper Daemon Preferences

include $(THEOS)/makefiles/common.mk
include $(THEOS_MAKE_PATH)/aggregate.mk

ifeq ($(THEOS_PACKAGE_SCHEME), rootless)
stage::
plutil -replace Program -string $(THEOS_PACKAGE_INSTALL_PREFIX)/usr/libexec/kayokod $(THEOS_STAGING_DIR)/Library/LaunchDaemons/dev.traurige.kayokod.plist
endif
1 change: 1 addition & 0 deletions Tweak/Helper/KayokoHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import <UIKit/UIKit.h>
#import "../../Preferences/NotificationKeys.h"
#import "../../Preferences/PreferenceKeys.h"
#import <libSandy.h>

#define iOS15 [[[UIDevice currentDevice] systemVersion] floatValue] >= 15.0

Expand Down
3 changes: 2 additions & 1 deletion Tweak/Helper/KayokoHelper.m
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ static void paste() {
#pragma mark - Preferences

static void load_preferences() {
preferences = [[NSUserDefaults alloc] initWithSuiteName:kPreferencesIdentifier];
preferences = [[NSUserDefaults alloc] initWithSuiteName:[NSString stringWithFormat:@"/var/mobile/Library/Preferences/%@.plist", kPreferencesIdentifier]];
libSandy_applyProfile("Kayoko");

[preferences registerDefaults:@{
kPreferenceKeyEnabled: @(kPreferenceKeyEnabledDefaultValue),
Expand Down
1 change: 1 addition & 0 deletions Tweak/Helper/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TWEAK_NAME = KayokoHelper
KayokoHelper_FILES = KayokoHelper.m
KayokoHelper_CFLAGS = -fobjc-arc -DTHEOS_LEAN_AND_MEAN
KayokoHelper_FRAMEWORKS = UIKit
KayokoHelper_LIBRARIES = Sandy

include $(THEOS)/makefiles/common.mk
include $(THEOS_MAKE_PATH)/aggregate.mk
Expand Down
4 changes: 2 additions & 2 deletions control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: dev.traurige.kayoko
Name: Kayoko
Depends: firmware (>= 13.0), mobilesubstrate, preferenceloader
Version: 1.2
Depends: firmware (>= 13.0), mobilesubstrate, preferenceloader, com.opa334.libsandy
Version: 1.3
Architecture: iphoneos-arm
Description: Feature rich clipboard manager for iOS
Maintainer: Traurige <[email protected]>
Expand Down
21 changes: 21 additions & 0 deletions layout/Library/libSandy/Kayoko.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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>AllowedProcesses</key>
<array>
<string>*</string>
</array>
<key>Extensions</key>
<array>
<dict>
<key>type</key>
<string>file</string>
<key>extension_class</key>
<string>com.apple.app-sandbox.read-write</string>
<key>path</key>
<string>/var/mobile/Library/Preferences/dev.traurige.kayoko.preferences.plist</string>
</dict>
</array>
</dict>
</plist>

0 comments on commit 9d86374

Please sign in to comment.