@@ -892,7 +892,7 @@ private func convert(_ value: NFCMiFareFamily) -> MiFareFamilyPigeon {
892892 case . ultralight: return . ultralight
893893 case . plus: return . plus
894894 case . desfire: return . desfire
895- default : fatalError ( )
895+ @ unknown default : fatalError ( )
896896 }
897897}
898898
@@ -946,15 +946,18 @@ private func convert(_ value: NFCReaderError.Code) -> NfcReaderErrorCodePigeon {
946946 case . readerTransceiveErrorSessionInvalidated: return . readerTransceiveErrorSessionInvalidated
947947 case . readerTransceiveErrorPacketTooLong: return . readerTransceiveErrorPacketTooLong
948948 case . tagCommandConfigurationErrorInvalidParameters: return . tagCommandConfigurationErrorInvalidParameters
949- case . readerErrorAccessNotAccepted: return . readerErrorAccessNotAccepted
950- case . readerErrorIneligible: return . readerErrorIneligible
951949 case . readerErrorUnsupportedFeature: return . readerErrorUnsupportedFeature
952950 case . readerErrorInvalidParameter: return . readerErrorInvalidParameter
953951 case . readerErrorInvalidParameterLength: return . readerErrorInvalidParameterLength
954952 case . readerErrorParameterOutOfBound: return . readerErrorParameterOutOfBound
955953 case . readerErrorRadioDisabled: return . readerErrorRadioDisabled
956954 case . readerErrorSecurityViolation: return . readerErrorSecurityViolation
957- @unknown default : fatalError ( )
955+ default :
956+ // Introduced in iOS SDK 26; since we added it before 26 was widely adopted, compare `rawValue` to maintain backward compatibility.
957+ // See: https://github.com/okadan/flutter-nfc-manager/issues/249
958+ if ( value. rawValue == 7 ) { return . readerErrorIneligible }
959+ if ( value. rawValue == 8 ) { return . readerErrorAccessNotAccepted }
960+ fatalError ( )
958961 }
959962}
960963
0 commit comments