diff --git a/ios/src_library/React Native/RNIError/RNIGenericErrorCode.swift b/ios/src_library/React Native/RNIError/RNIGenericErrorCode.swift index 428cbc52..a4adcced 100644 --- a/ios/src_library/React Native/RNIError/RNIGenericErrorCode.swift +++ b/ios/src_library/React Native/RNIError/RNIGenericErrorCode.swift @@ -11,6 +11,6 @@ import Foundation public enum RNIGenericErrorCode: String, Codable, CaseIterable, RNIGenericErrorDefaultable { - case runtimeError, libraryError, reactError, unknownError, - invalidArgument, outOfBounds, invalidReactTag, nilValue; + // placeholder + case unspecified; }; diff --git a/ios/src_library/React Native/RNIError/RNIGenericErrorDefaultable+Default.swift b/ios/src_library/React Native/RNIError/RNIGenericErrorDefaultable+Default.swift new file mode 100644 index 00000000..6bc7ceea --- /dev/null +++ b/ios/src_library/React Native/RNIError/RNIGenericErrorDefaultable+Default.swift @@ -0,0 +1,42 @@ +// +// RNIGenericErrorDefaultable+Default.swift +// react-native-ios-modal +// +// Created by Dominic Go on 5/10/23. +// + +import Foundation + +public extension RNIGenericErrorDefaultable { + static var runtimeError: Self { + Self.runtimeError + }; + + static var libraryError: Self { + Self.libraryError + }; + + static var reactError: Self { + Self.reactError + }; + + static var unknownError: Self { + Self.unknownError + }; + + static var invalidArgument: Self { + Self.invalidArgument + }; + + static var outOfBounds: Self { + Self.outOfBounds + }; + + static var invalidReactTag: Self { + Self.invalidReactTag + }; + + static var nilValue: Self { + Self.nilValue + }; +};