Skip to content

Commit

Permalink
feat: better explanation for ppqcheck(?)
Browse files Browse the repository at this point in the history
  • Loading branch information
khcrysalis committed Aug 24, 2024
1 parent 6cbd667 commit 34d9b8f
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Shared/Data/UserDefaults/Preferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ enum Preferences {
@Storage(key: "Feather.ppqcheckBypass", defaultValue: "")
static var pPQCheckString: String

@Storage(key: "Feather.fuckOffPpqcheckDetection", defaultValue: false)
@Storage(key: "Feather.fuckOffPpqcheckDetection", defaultValue: true)
static var isFuckingPPqcheckDetectionOff: Bool

@Storage(key: "Feather.idWhitelist", defaultValue: ["kh.crysalis.feather", "kh.crysalis.feather2"])
Expand Down
4 changes: 2 additions & 2 deletions feather.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Shared/Signing/feather-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand Down Expand Up @@ -1120,7 +1120,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_OBJC_BRIDGING_HEADER = "Shared/Signing/feather-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
26 changes: 13 additions & 13 deletions iOS/Views/Apps/Signing/AppSigningInputViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class AppSigningInputViewController: UITableViewController {

override func numberOfSections(in tableView: UITableView) -> Int {
if ((appSigningViewController.certs?.certData?.pPQCheck) != nil) && valueToSaveTo == "bundleId"{
return 3
return 2
} else {
return 1
}
Expand Down Expand Up @@ -87,20 +87,20 @@ class AppSigningInputViewController: UITableViewController {
cell.textLabel?.text = "PPQCheck is Enabled"
cell.textLabel?.textColor = .systemRed

cell.detailTextLabel?.text = "Sadly your certificate seems to have the PPQCheck option enabled and cannot be turned off by any normal means, so we've appended a random string to your Bundle Identifier. If you wish to continue you may remove that prepended string or disable it in settings."
cell.detailTextLabel?.textColor = .systemOrange
cell.textLabel?.numberOfLines = 0
cell.detailTextLabel?.numberOfLines = 0
case 2:
cell = UITableViewCell(style: .subtitle, reuseIdentifier: "Cell")

cell.textLabel?.text = "Information"
cell.textLabel?.textColor = .label

cell.detailTextLabel?.text = "PPQCheck is a way for Apple to check if the app you're opening matches another bundle identifier found on the App Store, the check happens every time you open the signed installed application. By default we prepended the random string to save you from a headache of getting the Apple ID associated with the certificate locked."
cell.detailTextLabel?.textColor = .secondaryLabel
cell.detailTextLabel?.text = "PPQCheck is a way for Apple to check if the app you're opening matches another bundle identifier found on the App Store, the check happens on the first time you open the signed installed application. We have an option for you to avoid this, however you will no longer receive the benefits of notifications and such relating to the default identifier."
cell.detailTextLabel?.textColor = .label
cell.textLabel?.numberOfLines = 0
cell.detailTextLabel?.numberOfLines = 0
// case 2:
// cell = UITableViewCell(style: .subtitle, reuseIdentifier: "Cell")
//
// cell.textLabel?.text = "Information"
// cell.textLabel?.textColor = .label
//
// cell.detailTextLabel?.text = "PPQCheck is a way for Apple to check if the app you're opening matches another bundle identifier found on the App Store, the check happens every time you open the signed installed application. By default we prepended the random string to save you from a headache of getting the Apple ID associated with the certificate locked."
// cell.detailTextLabel?.textColor = .secondaryLabel
// cell.textLabel?.numberOfLines = 0
// cell.detailTextLabel?.numberOfLines = 0
default: break
}
return cell
Expand Down
2 changes: 1 addition & 1 deletion iOS/Views/Apps/Signing/AppSigningViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class AppSigningViewController: UITableViewController {
}

if let bundleId = app.value(forKey: "bundleidentifier") as? String {
if self.certs?.certData?.pPQCheck == true && Preferences.isFuckingPPqcheckDetectionOff == false {
if self.certs?.certData?.pPQCheck == true && Preferences.isFuckingPPqcheckDetectionOff == true {
self.bundleId = bundleId+"."+Preferences.pPQCheckString
} else {
self.bundleId = bundleId
Expand Down
20 changes: 19 additions & 1 deletion iOS/Views/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,17 @@ extension SettingsViewController {
}
case "Fuck PPQCheck":
let fuckPPq = SwitchViewCell()
fuckPPq.textLabel?.text = "Disable PPQCheck Protections"
fuckPPq.textLabel?.text = "PPQCheck Protection"
fuckPPq.switchControl.addTarget(self, action: #selector(fuckPpqcheckToggled(_:)), for: .valueChanged)
fuckPPq.switchControl.isOn = Preferences.isFuckingPPqcheckDetectionOff
fuckPPq.selectionStyle = .none

let infoButton = UIButton(type: .infoLight)
infoButton.addTarget(self, action: #selector(showPPQInfoAlert), for: .touchUpInside)
fuckPPq.accessoryView = infoButton

return fuckPPq

case "PPQCheckMitigationString":
cell.textLabel?.text = "Change Random Identifier"
cell.textLabel?.textColor = .tintColor
Expand Down Expand Up @@ -203,6 +209,18 @@ extension SettingsViewController {
return cell
}

@objc func showPPQInfoAlert() {
let alertController = UIAlertController(
title: "PPQCheck Protections",
message: "This setting enables the PPQCheck protections, which is designed to prepend each bundle identifier for the apps you sideload with a random string.\n\nThis is meant to avoid apple flagging your account by (trying) to make it so they're unable to associate the app your sideloading with one from the App Store.",
preferredStyle: .alert
)
alertController.addAction(UIAlertAction(title: "???", style: .default))
alertController.addAction(UIAlertAction(title: "I don't care", style: .destructive))
alertController.addAction(UIAlertAction(title: "Good to know", style: .cancel))
present(alertController, animated: true, completion: nil)
}

@objc func onlinePathToggled(_ sender: UISwitch) {
Preferences.userSelectedServer = sender.isOn
}
Expand Down

0 comments on commit 34d9b8f

Please sign in to comment.