How do you convert an iPhone OSStatus code to something useful?

前端 未结 19 1630
执念已碎
执念已碎 2020-12-05 01:45

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 \

19条回答
  •  忘掉有多难
    2020-12-05 02:07

    OSStatus is a signed integer value. You cannot convert or "cast" it to a string. You can convert it to a NSError like this:

    NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:osStatus userInfo:nil];

提交回复
热议问题