Skip to content

Commit

Permalink
clean up a little (2.0.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lrdsnow committed Jul 24, 2024
1 parent 75bb70f commit 628574e
Show file tree
Hide file tree
Showing 19 changed files with 204 additions and 57 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name: Deploy Jekyll site to Pages
on:
push:
branches: ["main"]
paths: ["docs/**"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions PurePKG.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@
"@executable_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.0.1;
MARKETING_VERSION = 2.0.2;
PRODUCT_BUNDLE_IDENTIFIER = uwu.lrdsnow.purepkg;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -637,7 +637,7 @@
"@executable_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 13.0;
MARKETING_VERSION = 2.0.1;
MARKETING_VERSION = 2.0.2;
PRODUCT_BUNDLE_IDENTIFIER = uwu.lrdsnow.purepkg;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
13 changes: 10 additions & 3 deletions PurePKG/Main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ struct PurePKGBinary {
(CommandLine.arguments[1] == "getToken" || CommandLine.arguments[1] == "roothelper") {
exit(RootHelperMain());
}
// setup user defaults
UserDefaults.standard.register(defaults: [
"refreshOnStart" : true,
"checkSignature" : false,
"hidePaidTweaks" : false,
"usePaymentAPI" : false
])
//

log(getuid())
Expand Down Expand Up @@ -67,7 +74,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
appData.installed_pkgs = RepoHandler.getInstalledTweaks(Jailbreak().path+"/Library/dpkg")
appData.repos = RepoHandler.getCachedRepos()
appData.pkgs = appData.repos.flatMap { $0.tweaks }
if !UserDefaults.standard.bool(forKey: "ignoreInitRefresh") {
if UserDefaults.standard.bool(forKey: "refreshOnStart") {
Task(priority: .background) {
refreshRepos(appData)
}
Expand Down Expand Up @@ -175,7 +182,7 @@ struct ContentViewWatchOS: View {
appData.installed_pkgs = RepoHandler.getInstalledTweaks(Jailbreak().path+"/Library/dpkg")
appData.repos = RepoHandler.getCachedRepos()
appData.pkgs = appData.repos.flatMap { $0.tweaks }
if !UserDefaults.standard.bool(forKey: "ignoreInitRefresh") {
if UserDefaults.standard.bool(forKey: "refreshOnStart") {
Task(priority: .background) {
refreshRepos(appData)
}
Expand Down Expand Up @@ -253,7 +260,7 @@ struct ContentView: View {
appData.installed_pkgs = RepoHandler.getInstalledTweaks(Jailbreak().path+"/Library/dpkg")
appData.repos = RepoHandler.getCachedRepos()
appData.pkgs = appData.repos.flatMap { $0.tweaks }
if !UserDefaults.standard.bool(forKey: "ignoreInitRefresh") {
if UserDefaults.standard.bool(forKey: "refreshOnStart") {
Task(priority: .background) {
refreshRepos(appData)
}
Expand Down
21 changes: 6 additions & 15 deletions PurePKG/Views/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import AuthenticationServices
struct SettingsView: View {
@EnvironmentObject var appData: AppData
@State private var jb: String? = nil
@State private var VerifySignature: Bool = true
@State private var RefreshOnStart: Bool = true
@AppStorageC("checkSignature") var VerifySignature: Bool = false
@AppStorageC("refreshOnStart") var RefreshOnStart: Bool = true

var body: some View {
List {
Expand Down Expand Up @@ -100,16 +100,12 @@ struct SettingsView: View {
Toggle(isOn: $VerifySignature, label: {
Text("Verify GPG Signature").minimumScaleFactor(0.5)
}).tintC(.accentColor)
}.onChangeC(of: VerifySignature) { _ in
UserDefaults.standard.set(VerifySignature, forKey: "checkSignature")
}.listRowBG()

HStack {
Toggle(isOn: $RefreshOnStart, label: {
Text("Refresh Repos on Start").minimumScaleFactor(0.5)
}).tintC(.accentColor)
}.onChangeC(of: RefreshOnStart) { _ in
UserDefaults.standard.set(!RefreshOnStart, forKey: "ignoreInitRefresh")
}.listRowBG()
if #available(iOS 14.0, tvOS 16.0, *),
Device().uniqueIdentifier != "" {
Expand Down Expand Up @@ -145,7 +141,6 @@ struct SettingsView: View {
.appBG()
.onAppear() {
jb = Jailbreak.jailbreak()
VerifySignature = UserDefaults.standard.bool(forKey: "checkSignature")
}
}
}
Expand All @@ -154,23 +149,19 @@ struct SettingsView: View {
struct PaymentSettingsView: View {
@StateObject private var viewModel = PaymentAPI_AuthenticationViewModel()
@EnvironmentObject var appData: AppData
@State private var usePaymentAPI: Bool = UserDefaults.standard.bool(forKey: "usePaymentAPI")
@State private var hidePaidTweaks: Bool = UserDefaults.standard.bool(forKey: "hidePaidTweaks")
@AppStorageC("usePaymentAPI") var usePaymentAPI: Bool = false
@AppStorageC("hidePaidTweaks") var hidePaidTweaks: Bool = false

var body: some View {
List {
Section {
Toggle(isOn: $hidePaidTweaks, label: {
Text("Hide Paid Tweaks")
}).tintC(.accentColor).onChangeC(of: hidePaidTweaks) { _ in
UserDefaults.standard.set(hidePaidTweaks, forKey: "hidePaidTweaks")
}.listRowBG()
}).tintC(.accentColor).listRowBG()
if !hidePaidTweaks {
Toggle(isOn: $usePaymentAPI, label: {
Text("Use Payment API")
}).tintC(.accentColor).onChangeC(of: usePaymentAPI) { _ in
UserDefaults.standard.set(usePaymentAPI, forKey: "usePaymentAPI")
}.listRowBG()
}).tintC(.accentColor).listRowBG()
}
#if os(tvOS)
Button(action: {
Expand Down
22 changes: 22 additions & 0 deletions Shared/Extensions/UserDefaultsExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,25 @@ extension UserDefaults {
}
}
#endif

@propertyWrapper
struct AppStorageC<Value>: DynamicProperty {
let key: String
let defaultValue: Value

init(wrappedValue defaultValue: Value, _ key: String) {
self.key = key
self.defaultValue = defaultValue
self._wrappedValue = State(wrappedValue: UserDefaults.standard.object(forKey: key) as? Value ?? defaultValue)
}

@State var wrappedValue: Value {
didSet { UserDefaults.standard.set(wrappedValue, forKey: key) }
}
var projectedValue: Binding<Value> {
return Binding(
get: { wrappedValue },
set: { wrappedValue = $0 }
)
}
}
6 changes: 3 additions & 3 deletions Shared/Jailbreak.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public class Jailbreak {

var arch: String {
get {
#if targetEnvironment(simulator)
return "iphoneos-arm64"
#endif
//#if targetEnvironment(simulator)
// return "iphoneos-arm64"
//#endif

#if os(macOS)
return "darwin-\(getMacOSArchitecture() ?? "unknown")"
Expand Down
6 changes: 6 additions & 0 deletions docs/Contents
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Applications/PurePKG.app/BitByteData_BitByteData.bundle/PrivacyInfo.xcprivacy uw
Applications/PurePKG.app/Contents/Icon.png uwu.lrdsnow.purepkg
Applications/PurePKG.app/Contents/Info.plist uwu.lrdsnow.purepkg
Applications/PurePKG.app/Contents/MacOS/PurePKG uwu.lrdsnow.purepkg
Applications/PurePKG.app/Contents/MacOS/PurePKG.debug.dylib uwu.lrdsnow.purepkg
Applications/PurePKG.app/Contents/MacOS/__preview.dylib uwu.lrdsnow.purepkg
Applications/PurePKG.app/Contents/PkgInfo uwu.lrdsnow.purepkg
Applications/PurePKG.app/Contents/Resources/AppIcon.icns uwu.lrdsnow.purepkg
Applications/PurePKG.app/Contents/Resources/Assets.car uwu.lrdsnow.purepkg
Expand Down Expand Up @@ -40,8 +42,10 @@ Applications/PurePKG.app/Icon.png uwu.lrdsnow.purepkg
Applications/PurePKG.app/Info.plist uwu.lrdsnow.purepkg
Applications/PurePKG.app/PkgInfo uwu.lrdsnow.purepkg
Applications/PurePKG.app/PurePKG uwu.lrdsnow.purepkg
Applications/PurePKG.app/PurePKG.debug.dylib uwu.lrdsnow.purepkg
Applications/PurePKG.app/SWCompression_SWCompression.bundle/Info.plist uwu.lrdsnow.purepkg
Applications/PurePKG.app/SWCompression_SWCompression.bundle/PrivacyInfo.xcprivacy uwu.lrdsnow.purepkg
Applications/PurePKG.app/__preview.dylib uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/[email protected] uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/AppIcon176x76@2x~ipad.png uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/[email protected] uwu.lrdsnow.purepkg
Expand All @@ -65,5 +69,7 @@ var/jb/Applications/PurePKG.app/Icon.png uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/Info.plist uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/PkgInfo uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/PurePKG uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/PurePKG.debug.dylib uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/SWCompression_SWCompression.bundle/Info.plist uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/SWCompression_SWCompression.bundle/PrivacyInfo.xcprivacy uwu.lrdsnow.purepkg
var/jb/Applications/PurePKG.app/__preview.dylib uwu.lrdsnow.purepkg
Binary file modified docs/Contents.gz
Binary file not shown.
34 changes: 17 additions & 17 deletions docs/InRelease
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ Hash: SHA512
Architectures: xros-arm64 watchos-arm appletvos-arm64 darwin-amd64 darwin-arm64 iphoneos-arm iphoneos-arm64 iphoneos-arm64e
Codename: purepkg
Components: main
Date: Sun, 23 Jun 2024 18:45:58 +0000
Date: Wed, 24 Jul 2024 15:18:09 +0000
Description: PurePKG
Label: PurePKG
Origin: PurePKG
Suite: stable
Version: 1.0
MD5Sum:
89e1411e55ffa2db2372bc8b6df829ab 4829 Packages
5a5b1a92d1e093335523b3fc69b061a1 1500 Packages.gz
0f30b25716ecd75ee3444b911aa43560 276 Release
aaa72710127726f55676b85ca2b3a289 9657 Packages
9e14208ec52e07bd30e1dbf0d3c9526c 2614 Packages.gz
6ba47465b2611d7a0e157ea3099459d0 276 Release
SHA1:
2ab03ff2dc7bdadb5ca6c7cbd31c40493aadd411 4829 Packages
60e426fed21ee60144bf2f5fc2ad14aae36cae6b 1500 Packages.gz
06f05f18ae1d6059c8a48e19a9a8b533907a4c94 276 Release
14d6200ecd8857a31c63015c870ca9411c12a1c4 9657 Packages
9ac4bf751a76d015bcea87b58d9ceae91626a402 2614 Packages.gz
1e68281349de776e2cd8aeb47c6fc61dec4bf15f 276 Release
SHA256:
d975ceeb698d10b1f532aa7d3c1a9509633ce15f53e7e769e3c9f63f9716b2f4 4829 Packages
2f4b9e46bdca57b8dd1b40cf7f1448a9873f23f876c229f916582d148b4d5682 1500 Packages.gz
19ff18d776a65c06d2be01af9dea156c0d71b8be6c1c38ae12b42e532c69da6f 276 Release
d1d3079e2340aa258353062ddacc74463d536f3a9306bafa478d0e5a90807446 9657 Packages
807f866e313c4c9482fa9b9a7b66f408ba9642372965febd71d7324f03d2faa0 2614 Packages.gz
a595efa4067e81a6df6a0b47a3f39bbbec2cc06df1f002a320cea08d29ebb669 276 Release
SHA512:
edc8aa5ea1a61150ea2bf2fb99695aa7823b82baecc293938769ec2f87bc94cf9948654e0fb8817e4483523033f3c0b29b788d07af0d69eb21f701e62bf7202d 4829 Packages
7216fe21df3fc511b27f1c540863c64b2d872ea62233778c5a5a7fdf6cfe1f9f60d7bbaa23dabd42e1f62e33900e80a52db5f277d4f75d81ef61136deb1d1b4e 1500 Packages.gz
3124d5df648e32506a6f0212753967d0973fffc0b9681455cb362b652126645847fc4f84eb352c8b155ce699f23b213f04d4d01c0218500724dd370d63012df3 276 Release
7f19375edd21a5d80e3d34cbc9198870705a681a95de7e477a546d775f4ec3d5eec3fb063f69f319f2fec93c7a6d0364d1a280e35f1d7922ea4f19c74f6490ad 9657 Packages
0e7753a7ad8ba65508965d434da714482a1decbaf259127d655d6caa2455fa42d07c207571e6fac14ef335b92b8561abbe6cf452253912ee121d6c4f6ed4dd03 2614 Packages.gz
197c43a97a9b9f67b238e62ecb7718971e61fcaf54cc3c06c9eb6cacba88d4486163133eeaa09d6955bbc13709b21c4ba1c94501666951416bec8644f2a7ca94 276 Release
-----BEGIN PGP SIGNATURE-----

iIsEARYKADMWIQQBMWcIEpH45YhabS7JZ9mKny64ZgUCZnhtaxUcbHJkc25vdzEw
MUBnbWFpbC5jb20ACgkQyWfZip8uuGYNIQEA73gV3+kKHv6gSx7rairYmynazTIr
HJRtkI/KN/MC/KQBAMmDTHTaF6XylE1EgQyrxHJ0y2aZWxY27yFn88e2jRUA
=4gHP
iIsEARYKADMWIQQBMWcIEpH45YhabS7JZ9mKny64ZgUCZqEbNxUcbHJkc25vdzEw
MUBnbWFpbC5jb20ACgkQyWfZip8uuGbxhgEAzBOtOk7CYlCG0XPH/ajAG8M/6T4N
hSgO+/DuyX2mTRUA/ipehFJf4CEBKK50Y480gy8ctD9ym6mADZKt3r1+MXAC
=Cxg3
-----END PGP SIGNATURE-----
120 changes: 120 additions & 0 deletions docs/Packages
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,123 @@ Support: https://discord.gg/purepkg
SileoDepiction: https://lrdsnow.github.io/purepkg/depiction.json
Icon: https://github.com/Lrdsnow/PurePKG/blob/main/Icon.png?raw=true

Package: uwu.lrdsnow.purepkg
Architecture: appletvos-arm64
Version: 2.0.2
Section: Package Manager
Maintainer: Lrdsnow
Depends: firmware (>= 13.0)
Conflicts: uwu.lrdsnow.purepkg.testing
Filename: ./debs/uwu.lrdsnow.purepkg_2.0.2_appletvos-arm64.deb
Size: 9596952
MD5sum: 630640150c2ff96218c2b0c6ecbf8f7f
SHA1: edf4d92728855063d4891a92443d2fef8af598a6
SHA256: 104fb867e89fdc2a7d131dfd8b0f73c3bc6f88d70f0d2c6b96b4947da6210a9d
SHA512: 3952d9507e3dc1bfb19d148db0ac28343c5ecf60bb4642d41c6fd8c35c84076a23af961dec9a05c0fdd5a4342fcb26bcb476000feec8ea9bddb053136570fde4
Description: The purest package manager ever!
Name: PurePKG
Author: Lrdsnow
Support: https://discord.gg/purepkg
SileoDepiction: https://lrdsnow.github.io/purepkg/depiction.json
Icon: https://github.com/Lrdsnow/PurePKG/blob/main/Icon.png?raw=true

Package: uwu.lrdsnow.purepkg
Architecture: darwin-amd64
Version: 2.0.2
Section: Package Manager
Maintainer: Lrdsnow
Depends: firmware (>= 13.0)
Conflicts: uwu.lrdsnow.purepkg.testing
Filename: ./debs/uwu.lrdsnow.purepkg_2.0.2_darwin-amd64.deb
Size: 4619068
MD5sum: 98031d591d4bae867ff66139f6a55c6b
SHA1: 2f80714b4db0ca5463082040f4530a4616a722d2
SHA256: 69dc0d56ce79dbd62743ab28ebecac01ebc6f42ea6509fccbae7d3f2a1088da9
SHA512: 4093182d631973df129026d66c1cd9d0504188e4319e8aa359b96a5adcba8f6db2ef1ec662f1729edb5d69a3bc11ca29980fe7fe31fc902b10a0d5be9638d53e
Description: The purest package manager ever!
Name: PurePKG
Author: Lrdsnow
Support: https://discord.gg/purepkg
SileoDepiction: https://lrdsnow.github.io/purepkg/depiction.json
Icon: https://github.com/Lrdsnow/PurePKG/blob/main/Icon.png?raw=true

Package: uwu.lrdsnow.purepkg
Architecture: darwin-arm64
Version: 2.0.2
Section: Package Manager
Maintainer: Lrdsnow
Depends: firmware (>= 13.0)
Conflicts: uwu.lrdsnow.purepkg.testing
Filename: ./debs/uwu.lrdsnow.purepkg_2.0.2_darwin-arm64.deb
Size: 4617356
MD5sum: 88847e7255b253ab5bb95e5e3fe799b3
SHA1: 4daa007b0a5f2dbc594094d3fe7820290152f5bb
SHA256: b49813a3ab3b3c5bdc0cdb6d474e39b4a80fcb95b590f2b6da17ddb9517ec8a4
SHA512: 7b6a9b0d7466dec88e57130c67fefe60b83f6c35d85d2c008ccd0ad7aaed89d49272b3dec024c771eb410986dbb92019ebe98769cc2571d5d935220986754350
Description: The purest package manager ever!
Name: PurePKG
Author: Lrdsnow
Support: https://discord.gg/purepkg
SileoDepiction: https://lrdsnow.github.io/purepkg/depiction.json
Icon: https://github.com/Lrdsnow/PurePKG/blob/main/Icon.png?raw=true

Package: uwu.lrdsnow.purepkg
Architecture: iphoneos-arm
Version: 2.0.2
Section: Package Manager
Maintainer: Lrdsnow
Depends: firmware (>= 13.0)
Conflicts: uwu.lrdsnow.purepkg.testing
Filename: ./debs/uwu.lrdsnow.purepkg_2.0.2_iphoneos-arm.deb
Size: 4407312
MD5sum: 3230e89a2b6c8cab71a8f521e75f825e
SHA1: a1496ab52af1c5ea21ab102352f5daacb3188c94
SHA256: 975aee8ce15df15b4cecb7cf57b6bddbc1a15be7fb81db2eae746788f4e4babe
SHA512: 0fa85584f52069d06a9c77b338830247391f9ca2de826d35b87574e5229bbc2b12e39125ac2771cab8999ca65ca8015b252870a8659994aa7e43333e3e76e41d
Description: The purest package manager ever!
Name: PurePKG
Author: Lrdsnow
Support: https://discord.gg/purepkg
SileoDepiction: https://lrdsnow.github.io/purepkg/depiction.json
Icon: https://github.com/Lrdsnow/PurePKG/blob/main/Icon.png?raw=true

Package: uwu.lrdsnow.purepkg
Architecture: iphoneos-arm64
Version: 2.0.2
Section: Package Manager
Maintainer: Lrdsnow
Depends: firmware (>= 13.0)
Conflicts: uwu.lrdsnow.purepkg.testing
Filename: ./debs/uwu.lrdsnow.purepkg_2.0.2_iphoneos-arm64.deb
Size: 4408496
MD5sum: 7f44c838046a601c2c45c7459ab41492
SHA1: 219c8869fd5c4694cdad9c065516a5a214761cd8
SHA256: ba72d54ffad24372950ee5bbd32c48a144a33d484729f0fb424de7dd5246cfaf
SHA512: fe640149b184618346f1c97b169247b010494cf158fd6a5c49e73c739ddfdc1f5e233e0f54c6acd3c1ba7928c13a2c6c84c31250c62af910a60df2c3dadb02df
Description: The purest package manager ever!
Name: PurePKG
Author: Lrdsnow
Support: https://discord.gg/purepkg
SileoDepiction: https://lrdsnow.github.io/purepkg/depiction.json
Icon: https://github.com/Lrdsnow/PurePKG/blob/main/Icon.png?raw=true

Package: uwu.lrdsnow.purepkg
Architecture: iphoneos-arm64e
Version: 2.0.2
Section: Package Manager
Maintainer: Lrdsnow
Depends: firmware (>= 13.0)
Conflicts: uwu.lrdsnow.purepkg.testing
Filename: ./debs/uwu.lrdsnow.purepkg_2.0.2_iphoneos-arm64e.deb
Size: 4406128
MD5sum: db570de6c8a725a4b95ef8298e4f6eb6
SHA1: 33c7fcdc36bfc2ee242dcd7bf97ba3671888bf08
SHA256: 9ce73fe6243bedcec995039a6b2353f905dd1cc1757e78aabf22757e8fc6c6ff
SHA512: ebda8efa083e60e55faecb3cb3575aeae004ddfc4fc3ca02d6deb289c4888edb5a0aa6e659f92d2a190be9d943c46e1f44b6ea7108829d53687452d530dfeb34
Description: The purest package manager ever!
Name: PurePKG
Author: Lrdsnow
Support: https://discord.gg/purepkg
SileoDepiction: https://lrdsnow.github.io/purepkg/depiction.json
Icon: https://github.com/Lrdsnow/PurePKG/blob/main/Icon.png?raw=true

Binary file modified docs/Packages.gz
Binary file not shown.
Loading

0 comments on commit 628574e

Please sign in to comment.