mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-19 03:33:36 +01:00
Shows AltStore build version in Settings for BETA builds
This commit is contained in:
@@ -101,7 +101,18 @@ class SettingsViewController: UITableViewController
|
|||||||
debugModeGestureRecognizer.numberOfTouchesRequired = 3
|
debugModeGestureRecognizer.numberOfTouchesRequired = 3
|
||||||
self.tableView.addGestureRecognizer(debugModeGestureRecognizer)
|
self.tableView.addGestureRecognizer(debugModeGestureRecognizer)
|
||||||
|
|
||||||
if let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
|
if let installedApp = InstalledApp.fetchAltStore(in: DatabaseManager.shared.viewContext)
|
||||||
|
{
|
||||||
|
#if BETA
|
||||||
|
// Only show build version for BETA builds.
|
||||||
|
let localizedVersion = installedApp.localizedVersion
|
||||||
|
#else
|
||||||
|
let localizedVersion = installedApp.version
|
||||||
|
#endif
|
||||||
|
|
||||||
|
self.versionLabel.text = NSLocalizedString(String(format: "AltStore %@", localizedVersion), comment: "AltStore Version")
|
||||||
|
}
|
||||||
|
else if let version = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
|
||||||
{
|
{
|
||||||
self.versionLabel.text = NSLocalizedString(String(format: "AltStore %@", version), comment: "AltStore Version")
|
self.versionLabel.text = NSLocalizedString(String(format: "AltStore %@", version), comment: "AltStore Version")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user