From 829d127269b2ebbc4c65b55f4cf8d75554d107b7 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Mon, 9 Aug 2021 16:54:53 -0700 Subject: [PATCH] Fixes BIOSError compilation error when compiling with Xcode 13 Xcode 12 and older incorrectly let us declare BIOSError.incorrectSize as @available(iOS 13), but Swift doesn't support @available for enum cases with associated values. Xcode 13 now properly enforces this restriction, so we instead mark the enum itself as @available(iOS 13). --- Delta/Settings/Cores/MelonDSCoreSettingsViewController.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Delta/Settings/Cores/MelonDSCoreSettingsViewController.swift b/Delta/Settings/Cores/MelonDSCoreSettingsViewController.swift index ed04562..7bff331 100644 --- a/Delta/Settings/Cores/MelonDSCoreSettingsViewController.swift +++ b/Delta/Settings/Cores/MelonDSCoreSettingsViewController.swift @@ -28,13 +28,12 @@ private extension MelonDSCoreSettingsViewController case changeCore } + @available(iOS 13, *) enum BIOSError: LocalizedError { case unknownSize(URL) case incorrectHash(URL, hash: String, expectedHash: String) case unsupportedHash(URL, hash: String) - - @available(iOS 13, *) case incorrectSize(URL, size: Int, validSizes: Set>>) private static let byteFormatter: ByteCountFormatter = {