@@ -54,7 +54,7 @@ CFStringRef convertkSecAccessControl(NSString* key){
5454}
5555
5656// Messages from the comments in <Security/SecBase.h>
57- NSString *messageForError (NSError *error)
57+ - ( NSString *) messageForError : (NSError *) error
5858{
5959 switch (error.code ) {
6060 case errSecUnimplemented:
@@ -128,7 +128,7 @@ CFStringRef convertkSecAccessControl(NSString* key){
128128 osStatus = SecItemAdd ((__bridge CFDictionaryRef) query, NULL );
129129 if (osStatus != noErr) {
130130 NSError *error = [NSError errorWithDomain: NSOSStatusErrorDomain code: osStatus userInfo: nil ];
131- reject ([NSString stringWithFormat: @" %ld " ,(long )error.code], messageForError ( error) , nil );
131+ reject ([NSString stringWithFormat: @" %ld " ,(long )error.code], [ self messageForError: error] , nil );
132132 return ;
133133 }
134134 resolve (nil );
@@ -161,7 +161,7 @@ CFStringRef convertkSecAccessControl(NSString* key){
161161
162162 if (osStatus != noErr && osStatus != errSecItemNotFound) {
163163 NSError *error = [NSError errorWithDomain: NSOSStatusErrorDomain code: osStatus userInfo: nil ];
164- reject ([NSString stringWithFormat: @" %ld " ,(long )error.code], messageForError ( error) , nil );
164+ reject ([NSString stringWithFormat: @" %ld " ,(long )error.code], [ self messageForError: error] , nil );
165165 return ;
166166 }
167167
@@ -250,7 +250,7 @@ CFStringRef convertkSecAccessControl(NSString* key){
250250 OSStatus osStatus = SecItemDelete ((__bridge CFDictionaryRef) query);
251251 if (osStatus != noErr && osStatus != errSecItemNotFound) {
252252 NSError *error = [NSError errorWithDomain: NSOSStatusErrorDomain code: osStatus userInfo: nil ];
253- reject ([NSString stringWithFormat: @" %ld " ,(long )error.code], messageForError ( error) , nil );
253+ reject ([NSString stringWithFormat: @" %ld " ,(long )error.code], [ self messageForError: error] , nil );
254254 return ;
255255 }
256256 resolve (nil );
0 commit comments