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

前端 未结 19 1584
执念已碎
执念已碎 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:06

    This might be help.

    static NSString *stringForOSStatus(OSStatus status)
    {
        NSBundle *bundle = [NSBundle bundleWithIdentifier:@"com.apple.security"];
        NSString *key = [NSString stringWithFormat:@"%d", status];
        return [bundle localizedStringForKey:key value:key table:@"SecErrorMessages"];
    }
    

提交回复
热议问题