I am getting more than a little sick of this iPhone SDK and its documentation...
I am calling AudioConverterNew
in the documentation under Returns: it says \
I combined a few answers. Actually I were looking something like „throw errorForStatusCode(status)”. But in the end achieved:
guard status == errSecSuccess else {
throw NSError(domain: NSOSStatusErrorDomain, code: Int(status), userInfo: [NSLocalizedDescriptionKey: SecCopyErrorMessageString(status, nil) ?? "Undefined error"])
}
SecCopyErrorMessageString is available from iOS 11.3 https://developer.apple.com/documentation/security/1542001-security_framework_result_codes