Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9d86374

Browse files
AlexandraAlexandra
Alexandra
authored and
Alexandra
committedMay 16, 2023
added rootless support
1 parent 3ca9c9f commit 9d86374

File tree

6 files changed

+32
-3
lines changed

6 files changed

+32
-3
lines changed
 

‎Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,8 @@ SUBPROJECTS = Tweak/Core Tweak/Helper Daemon Preferences
1313

1414
include $(THEOS)/makefiles/common.mk
1515
include $(THEOS_MAKE_PATH)/aggregate.mk
16+
17+
ifeq ($(THEOS_PACKAGE_SCHEME), rootless)
18+
stage::
19+
plutil -replace Program -string $(THEOS_PACKAGE_INSTALL_PREFIX)/usr/libexec/kayokod $(THEOS_STAGING_DIR)/Library/LaunchDaemons/dev.traurige.kayokod.plist
20+
endif

‎Tweak/Helper/KayokoHelper.h

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#import <UIKit/UIKit.h>
1010
#import "../../Preferences/NotificationKeys.h"
1111
#import "../../Preferences/PreferenceKeys.h"
12+
#import <libSandy.h>
1213

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

‎Tweak/Helper/KayokoHelper.m

+2-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ static void paste() {
137137
#pragma mark - Preferences
138138

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

142143
[preferences registerDefaults:@{
143144
kPreferenceKeyEnabled: @(kPreferenceKeyEnabledDefaultValue),

‎Tweak/Helper/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ TWEAK_NAME = KayokoHelper
22
KayokoHelper_FILES = KayokoHelper.m
33
KayokoHelper_CFLAGS = -fobjc-arc -DTHEOS_LEAN_AND_MEAN
44
KayokoHelper_FRAMEWORKS = UIKit
5+
KayokoHelper_LIBRARIES = Sandy
56

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

‎control

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: dev.traurige.kayoko
22
Name: Kayoko
3-
Depends: firmware (>= 13.0), mobilesubstrate, preferenceloader
4-
Version: 1.2
3+
Depends: firmware (>= 13.0), mobilesubstrate, preferenceloader, com.opa334.libsandy
4+
Version: 1.3
55
Architecture: iphoneos-arm
66
Description: Feature rich clipboard manager for iOS
77
Maintainer: Traurige <hello@traurige.dev>

‎layout/Library/libSandy/Kayoko.plist

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>AllowedProcesses</key>
6+
<array>
7+
<string>*</string>
8+
</array>
9+
<key>Extensions</key>
10+
<array>
11+
<dict>
12+
<key>type</key>
13+
<string>file</string>
14+
<key>extension_class</key>
15+
<string>com.apple.app-sandbox.read-write</string>
16+
<key>path</key>
17+
<string>/var/mobile/Library/Preferences/dev.traurige.kayoko.preferences.plist</string>
18+
</dict>
19+
</array>
20+
</dict>
21+
</plist>

0 commit comments

Comments
 (0)
This repository has been archived.