Limits DS support to beta builds

This commit is contained in:
Riley Testut 2019-09-12 15:25:13 -07:00
parent 6f0137339a
commit aa05e57afc
5 changed files with 29 additions and 2 deletions

View File

@ -38,7 +38,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate
{ {
Settings.registerDefaults() Settings.registerDefaults()
#if BETA
System.allCases.forEach { Delta.register($0.deltaCore) } System.allCases.forEach { Delta.register($0.deltaCore) }
#else
System.allCases.filter { $0 != .ds }.forEach { Delta.register($0.deltaCore) }
#endif
#if DEBUG #if DEBUG

View File

@ -201,6 +201,13 @@ extension DatabaseManager
continue continue
} }
#if !BETA
guard system != .ds else {
errors.insert(.unsupported(url))
continue
}
#endif
let identifier: String let identifier: String
do do

View File

@ -13,7 +13,11 @@ extension Bundle
{ {
@objc private var swizzled_infoDictionary: [String : Any]? { @objc private var swizzled_infoDictionary: [String : Any]? {
var infoDictionary = self.swizzled_infoDictionary var infoDictionary = self.swizzled_infoDictionary
#if BETA
infoDictionary?[kCFBundleIdentifierKey as String] = "com.rileytestut.Delta.AltStore.Beta"
#else
infoDictionary?[kCFBundleIdentifierKey as String] = "com.rileytestut.Delta.AltStore" infoDictionary?[kCFBundleIdentifierKey as String] = "com.rileytestut.Delta.AltStore"
#endif
return infoDictionary return infoDictionary
} }

View File

@ -323,7 +323,13 @@ extension GamesViewController: ImportControllerDelegate
{ {
@IBAction private func importFiles() @IBAction private func importFiles()
{ {
var documentTypes = Set(System.allCases.map { $0.gameType.rawValue }) #if BETA
let systems = System.allCases
#else
let systems = System.allCases.filter { $0 != .ds }
#endif
var documentTypes = Set(systems.map { $0.gameType.rawValue })
documentTypes.insert(kUTTypeZipArchive as String) documentTypes.insert(kUTTypeZipArchive as String)
// Add GBA4iOS's exported UTIs in case user has GBA4iOS installed (which may override Delta's UTI declarations) // Add GBA4iOS's exported UTIs in case user has GBA4iOS installed (which may override Delta's UTI declarations)

View File

@ -232,7 +232,13 @@ extension SettingsViewController
switch section switch section
{ {
case .controllers: return 1 // Temporarily hide other controller indexes until controller logic is finalized case .controllers: return 1 // Temporarily hide other controller indexes until controller logic is finalized
case .controllerSkins: return System.allCases.count case .controllerSkins:
#if BETA
return System.allCases.count
#else
return System.allCases.filter { $0 != .ds}.count
#endif
case .syncing: return SyncManager.shared.coordinator?.account == nil ? 1 : super.tableView(tableView, numberOfRowsInSection: sectionIndex) case .syncing: return SyncManager.shared.coordinator?.account == nil ? 1 : super.tableView(tableView, numberOfRowsInSection: sectionIndex)
default: default:
if isSectionHidden(section) if isSectionHidden(section)