Skip to content

Commit

Permalink
Remove XinaA15 not supported notice, account for XinaA15 1.x/2.x (#337)
Browse files Browse the repository at this point in the history
* Remove XinaA15 notice

* Implement XinaA15 1.x and 2.x differentiation

* other small changes
  • Loading branch information
TheMasterOfMike authored Nov 28, 2023
1 parent 18e0ac2 commit 83bbf71
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 26 deletions.
9 changes: 3 additions & 6 deletions Sileo/Backend/Root Wrapper/Bootstrap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,10 @@ enum Bootstrap: String, Codable {
self = .electra_strap
}

case .unc0ver:
case .unc0ver, .checkra1n:
self = .elucubratus

case .checkra1n:
self = .elucubratus

case .odysseyra1n, .taurine, .odyssey:
case .odysseyra1n, .taurine, .odyssey, .fugu15, .xina15, .dopamine:
self = .procursus

case .palera1n_legacy, .palera1n_rootful, .palera1n_rootless, .bakera1n_rootful, .bakera1n_rootless:
Expand All @@ -49,7 +46,7 @@ enum Bootstrap: String, Codable {
self = .other_strap
}

case .xina15:
case .xina15_legacy:
self = .xinaa15_strap

default:
Expand Down
10 changes: 8 additions & 2 deletions Sileo/Backend/Root Wrapper/Jailbreak.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ enum Jailbreak: String, Codable {
case bakera1n_rootful = "bakera1n • Rootful"

/// Xina
case xina15_legacy = "XinaA15 • Legacy"
case xina15 = "XinaA15"

/// Fugu15
Expand Down Expand Up @@ -64,7 +65,7 @@ enum Jailbreak: String, Codable {

.bakera1n, .bakera1n_rootful, .bakera1n_rootless,

.fugu15, .dopamine
.fugu15, .xina, .dopamine
]

public var supportsUserspaceReboot: Bool {
Expand All @@ -82,7 +83,8 @@ enum Jailbreak: String, Codable {
let palera1n = URL(fileURLWithPath: "/cores/jbloader")
let palera1n_Legacy = URL(fileURLWithPath: "/jbin/post.sh")

let xina = URL(fileURLWithPath: "/var/Liy/.procursus_strapped")
let xina = URL(fileURLWithPath: "/var/jb/.installed_xina15")
let xina_Legacy = URL(fileURLWithPath: "/var/Liy/.procursus_strapped")
let fugu15_max = URL(fileURLWithPath: "/var/jb/.installed_fugu15max")
let dopamine = URL(fileURLWithPath: "/var/jb/.installed_dopamine")

Expand Down Expand Up @@ -128,6 +130,10 @@ enum Jailbreak: String, Codable {
case xina.exists && arm64e:
self = .xina15
return

case xina_Legacy.exists && arm64e:
self = .xina15_legacy
return

case fugu15_max.exists && arm64e:
self = .fugu15
Expand Down
18 changes: 0 additions & 18 deletions Sileo/UI/FeaturedViewController/FeaturedViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -241,20 +241,6 @@ final class FeaturedViewController: SileoViewController, UIScrollViewDelegate, F
self.reloadData()
updateSileoColors()
}

private class func showXinaWarning() {
let alert = UIAlertController(title: "XinaA15 no longer supported", message: "XinaA15 is no longer supported by Sileo, as recent changes make it impossible for Sileo to support XinaA15 in a functional manner. Please remove XinaA15 and switch to Fugu15 Max.", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Guide", style: .default) { _ in
UIApplication.shared.open(URL(string: "https://ios.cfw.guide/installing-fugu15max/")!)
exit(0)
})
alert.addAction(UIAlertAction(title: "Close", style: .destructive) { _ in
exit(0)
})
Thread.mainBlock {
TabBarController.singleton?.present(alert, animated: true)
}
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
Expand All @@ -265,10 +251,6 @@ final class FeaturedViewController: SileoViewController, UIScrollViewDelegate, F
self.navigationController?.navigationBar.superview?.tag = WHITE_BLUR_TAG
self.navigationController?.navigationBar._hidesShadow = true

if Jailbreak.current == .xina15 {
Self.showXinaWarning()
}

FRUIView.animate(withDuration: 0.2) {
self.profileButton?.alpha = 1.0
}
Expand Down

0 comments on commit 83bbf71

Please sign in to comment.