SecCopyErrorMessageString returns a string explaining the meaning of a security result code and its declaration is
func SecCopyErrorMessageString(
_ status: OSStatus,
_ reserved: UnsafeMutableRawPointer?
) -> CFString?
with typealias OSStatus = Int32
Having arbitrary OSStatus (for example for kAudioFormatUnsupportedDataFormatError it is 1718449215), is there something to get the description as string?
The idea would be analogous to:
let x: Int32 = 1718449215
if let errMsg = SecCopyErrorMessageString(x, nil) as? String{
print(errMsg)
}
This is not a security result code, and the output is just OSStatus 1718449215
, what I expect is a "string explaining the meaning".