From 161d3a795d982202ad02d2631e2888d9259439e6 Mon Sep 17 00:00:00 2001 From: Jackson Coxson Date: Tue, 15 Nov 2022 22:59:39 -0700 Subject: [PATCH] Add settings bundle --- AltStore.xcodeproj/project.pbxproj | 4 ++++ AltStore/LaunchViewController.swift | 2 -- .../FetchAnisetteDataOperation.swift | 2 +- AltStore/Settings.bundle/Root.plist | 21 ++++++++++++++++++ .../Settings.bundle/en.lproj/Root.strings | Bin 0 -> 546 bytes 5 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 AltStore/Settings.bundle/Root.plist create mode 100644 AltStore/Settings.bundle/en.lproj/Root.strings diff --git a/AltStore.xcodeproj/project.pbxproj b/AltStore.xcodeproj/project.pbxproj index 81fc54f6..e3d5d824 100644 --- a/AltStore.xcodeproj/project.pbxproj +++ b/AltStore.xcodeproj/project.pbxproj @@ -29,6 +29,7 @@ 191E607D290B2EA5001A3B7C /* jsmn.c in Sources */ = {isa = PBXBuildFile; fileRef = 191E5FD0290A651D001A3B7C /* jsmn.c */; }; 191E607E290B2EA7001A3B7C /* jplist.c in Sources */ = {isa = PBXBuildFile; fileRef = 191E5FCF290A651D001A3B7C /* jplist.c */; }; 191E6087290C7B50001A3B7C /* libminimuxer.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 191E5FB5290A5E1F001A3B7C /* libminimuxer.a */; }; + 1920B04F2924AC8300744F60 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 1920B04E2924AC8300744F60 /* Settings.bundle */; }; 19B9B7452845E6DF0076EF69 /* SelectTeamViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19B9B7442845E6DF0076EF69 /* SelectTeamViewController.swift */; }; 4879A95F2861046500FC1BBD /* AltSign in Frameworks */ = {isa = PBXBuildFile; productRef = 4879A95E2861046500FC1BBD /* AltSign */; }; 4879A9622861049C00FC1BBD /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = 4879A9612861049C00FC1BBD /* OpenSSL */; }; @@ -560,6 +561,7 @@ 191E6065290B2D6B001A3B7C /* termcolors.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = termcolors.c; path = "../Dependencies/libimobiledevice-glue/src/termcolors.c"; sourceTree = ""; }; 191E6073290B2E02001A3B7C /* companion_proxy.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = companion_proxy.c; path = ../Dependencies/libimobiledevice/src/companion_proxy.c; sourceTree = ""; }; 191E6074290B2E02001A3B7C /* preboard.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = preboard.c; path = ../Dependencies/libimobiledevice/src/preboard.c; sourceTree = ""; }; + 1920B04E2924AC8300744F60 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; 19B9B7442845E6DF0076EF69 /* SelectTeamViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelectTeamViewController.swift; sourceTree = ""; }; B3146EC6284F580500BBC3FD /* Roxas.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Roxas.xcodeproj; path = Dependencies/Roxas/Roxas.xcodeproj; sourceTree = ""; }; B39575F4284F29E20080B4FF /* Roxas.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Roxas.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1717,6 +1719,7 @@ BFD247962284D7C100981D42 /* Resources */, BF6C8FA8242935CA00125131 /* Dependencies */, BFD247972284D7D800981D42 /* Supporting Files */, + 1920B04E2924AC8300744F60 /* Settings.bundle */, ); path = AltStore; sourceTree = ""; @@ -2433,6 +2436,7 @@ BF44EEF3246B3A17002A52F2 /* AltBackup.ipa in Resources */, BF770E6922BD57DD002A40FE /* Silence.m4a in Resources */, BFD247772284B9A700981D42 /* Assets.xcassets in Resources */, + 1920B04F2924AC8300744F60 /* Settings.bundle in Resources */, BFF0B6922321A305007A79E1 /* AboutPatreonHeaderView.xib in Resources */, BFB6B22423187A3D0022A802 /* NewsCollectionViewCell.xib in Resources */, BFD247752284B9A500981D42 /* Main.storyboard in Resources */, diff --git a/AltStore/LaunchViewController.swift b/AltStore/LaunchViewController.swift index 22ce6229..4fde0ef4 100644 --- a/AltStore/LaunchViewController.swift +++ b/AltStore/LaunchViewController.swift @@ -87,8 +87,6 @@ class LaunchViewController: RSTLaunchViewController func setAnisetteServer() { if let anisetteUrl = Bundle.main.object(forInfoDictionaryKey: "customAnisetteURL") as? String { UserDefaults.standard.set(anisetteUrl, forKey: "customAnisetteURL") - } else { - UserDefaults.standard.set("https://sideloadly.io/anisette/irGb3Quww8zrhgqnzmrx", forKey: "customAnisetteURL") } } diff --git a/AltStore/Operations/FetchAnisetteDataOperation.swift b/AltStore/Operations/FetchAnisetteDataOperation.swift index 0cf60fb0..cf7c3bce 100644 --- a/AltStore/Operations/FetchAnisetteDataOperation.swift +++ b/AltStore/Operations/FetchAnisetteDataOperation.swift @@ -32,7 +32,7 @@ class FetchAnisetteDataOperation: ResultOperation return } - let urlString = UserDefaults.standard.string(forKey: "customAnisetteURL") ?? "https://sideloadly.io/anisette/irGb3Quww8zrhgqnzmrx" + let urlString = UserDefaults.standard.string(forKey: "customAnisetteURL")! print("Anisette URL: " + urlString) guard let url = URL(string: urlString) else { return } diff --git a/AltStore/Settings.bundle/Root.plist b/AltStore/Settings.bundle/Root.plist new file mode 100644 index 00000000..5e78f1b0 --- /dev/null +++ b/AltStore/Settings.bundle/Root.plist @@ -0,0 +1,21 @@ + + + + + StringsTable + Root + PreferenceSpecifiers + + + Type + PSTextFieldSpecifier + Title + Anisette URL + Key + customAnisetteURL + DefaultValue + https://sideloadly.io/anisette/irGb3Quww8zrhgqnzmrx + + + + diff --git a/AltStore/Settings.bundle/en.lproj/Root.strings b/AltStore/Settings.bundle/en.lproj/Root.strings new file mode 100644 index 0000000000000000000000000000000000000000..8cd87b9d6b20c1fbf87bd4db3db267fca5ad4df9 GIT binary patch literal 546 zcmaixOHRW;5JYRuDMndFh#Ua1V1d}N;sVAV2TO?uC3a9aJn*VxFrY}tnon0(S66#J z-d9>G>6W!ur(SDqlp`9nn~*(m%iWnv?yq`Qfp6XbK1?+om~~#r)ZnhkYQU_VbfjuT zHNn`CX<0sd*m1A}>&5sU$akD=GTXJ1e literal 0 HcmV?d00001