Skip to content

Commit b7758ab

Browse files
committed
1.0.3
1 parent f4ecbe8 commit b7758ab

File tree

4 files changed

+31
-25
lines changed

4 files changed

+31
-25
lines changed

Geranium.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@
873873
"$(inherited)",
874874
"@executable_path/Frameworks",
875875
);
876-
MARKETING_VERSION = 1.0.2;
876+
MARKETING_VERSION = 1.0.3;
877877
PRODUCT_BUNDLE_IDENTIFIER = live.cclerc.geranium;
878878
PRODUCT_NAME = "$(TARGET_NAME)";
879879
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -911,7 +911,7 @@
911911
"$(inherited)",
912912
"@executable_path/Frameworks",
913913
);
914-
MARKETING_VERSION = 1.0.2;
914+
MARKETING_VERSION = 1.0.3;
915915
PRODUCT_BUNDLE_IDENTIFIER = live.cclerc.geranium;
916916
PRODUCT_NAME = "$(TARGET_NAME)";
917917
SWIFT_EMIT_LOC_STRINGS = YES;

Geranium/ByeTime/ByeTimeHelper.swift

+7-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let STString = "/var/mobile/Library/Preferences/com.apple.ScreenTimeAgent.plist"
1212

1313
let STBckPath = "/var/mobile/Library/Preferences/com.apple.ScreenTimeAgent.gerackup"
1414

15-
func DisableScreenTime(screentimeagentd: Bool, usagetrackingd: Bool, homed: Bool)->String {
15+
func DisableScreenTime(screentimeagentd: Bool, usagetrackingd: Bool, homed: Bool, familycircled: Bool){
1616
var result = ""
1717
// Backuping ScreenTime preferences if they exists.
1818
if !FileManager.default.fileExists(atPath: STBckPath) {
@@ -48,6 +48,9 @@ func DisableScreenTime(screentimeagentd: Bool, usagetrackingd: Bool, homed: Bool
4848
if usagetrackingd {
4949
killall("UsageTrackingAgent")
5050
}
51+
if familycircled {
52+
killall("familycircled")
53+
}
5154

5255
// Remove ScreenTime preferences if STA respawned it (STA= ScreenTimeAgent)
5356
if !FileManager.default.fileExists(atPath: STBckPath) {
@@ -73,9 +76,11 @@ func DisableScreenTime(screentimeagentd: Bool, usagetrackingd: Bool, homed: Bool
7376
if usagetrackingd {
7477
daemonManagement(key: "com.apple.UsageTrackingAgent", value: true, plistPath: "/var/db/com.apple.xpc.launchd/disabled.plist")
7578
}
79+
if familycircled {
80+
daemonManagement(key: "com.apple.familycircled", value: true, plistPath: "/var/db/com.apple.xpc.launchd/disabled.plist")
81+
}
7682
// UserSpace Reboot
7783
successVibrate()
7884
sleep(3)
7985
rebootUSR()
80-
return "done"
8186
}

Geranium/ByeTime/ByeTimeView.swift

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ struct ByeTimeView: View {
1212
@State var ScreenTimeAgent: Bool = true
1313
@State var usagetrackingd: Bool = true
1414
@State var homed: Bool = false
15+
@State var familycircled: Bool = false
1516
var body: some View {
1617
VStack {
1718
List {
@@ -31,11 +32,16 @@ struct ByeTimeView: View {
3132
Text("Disable Homed")
3233
}
3334
}
35+
// Section(header: Label("Familycircled", systemImage: "figure.and.child.holdinghands"), footer: Text("Familycircled is in charge of iCloud Family system. This includes subscriptions, so if you disable this you won't be able to use them. However, this can help preventing ScreenTime from working.")) {
36+
// Toggle(isOn: $familycircled) {
37+
// Text("Disable Familycircled")
38+
// }
39+
// }
3440
}
3541
Button("Bye ScreenTime !", action : {
3642
UIApplication.shared.confirmAlert(title: "You are about to disable those daemons.", body: "This will delete Screen Time Preferences files and prevent the following daemoms from starting up with iOS. Are you sure you want to continue ?", onOK: {
3743
UIApplication.shared.alert(title: "Removing Screen Time...", body: "Your device will reboot.", animated: false, withButton: false)
38-
DisableScreenTime(screentimeagentd: ScreenTimeAgent, usagetrackingd: usagetrackingd, homed: homed)
44+
DisableScreenTime(screentimeagentd: ScreenTimeAgent, usagetrackingd: usagetrackingd, homed: homed, familycircled: familycircled)
3945
}, noCancel: false, yes: true)
4046
})
4147
.padding(10)

Geranium/SettingsView.swift

+15-20
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,32 @@ struct SettingsView: View {
1414
@State var localisation: String = {
1515
if let languages = UserDefaults.standard.array(forKey: "AppleLanguages") as? [String],
1616
let firstLanguage = languages.first {
17-
return firstLanguage
18-
} else {
1917
return Locale.current.languageCode ?? "en"
18+
} else {
19+
return "en"
2020
}
2121
}()
2222
@StateObject private var appSettings = AppSettings()
2323

2424
let languageMapping: [String: String] = [
2525
// i made catgpt work for me on this one
26-
"ca": "Catalan",
27-
"cs": "Czech",
28-
"de": "German",
29-
"el": "Greek",
26+
"zh-Hans": "Chinese (Simplified)", //
27+
"zh-Hant": "Chinese (Traditional)", //
3028
"en": "English",
31-
"es": "Spanish",
32-
"es-419": "Spanish (Latin America)",
33-
"fi": "Finnish",
34-
"fr": "French",
35-
"it": "Italian",
36-
"ja": "Japanese",
37-
"ko": "Korean",
38-
"ru": "Russian",
39-
"sk": "Slovak",
40-
"sr": "Serbian",
41-
"sv": "Swedish",
29+
"es": "Spanish", //
30+
"es-419": "Spanish (Latin America)", //
31+
"fr": "French", //
32+
"it": "Italian", //
33+
"ja": "Japanese", //
34+
"ko": "Korean", //
35+
"ru": "Russian", //
36+
"sk": "Slovak", //
37+
"sv": "Swedish", //
4238
"vi": "Vietnamese",
43-
"zh-Hans": "Chinese (Simplified)",
44-
"zh-Hant": "Chinese (Traditional)",
39+
"Default": "Default"//
4540
]
4641
var sortedLocalisalist: [String] {
47-
Bundle.main.localizations.sorted()
42+
languageMapping.keys.sorted()
4843
}
4944
var body: some View {
5045
NavigationView {

0 commit comments

Comments
 (0)