From 2b54a02dbed2ee1d0818e6cb390b21464efab0bd Mon Sep 17 00:00:00 2001 From: Grigori Goldman Date: Tue, 7 Aug 2018 23:25:03 +1000 Subject: [PATCH] Fixed build error when used with react-native-keychain lib --- ios/RNSensitiveInfo/RNSensitiveInfo.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ios/RNSensitiveInfo/RNSensitiveInfo.m b/ios/RNSensitiveInfo/RNSensitiveInfo.m index 8f4874bd..114790ab 100644 --- a/ios/RNSensitiveInfo/RNSensitiveInfo.m +++ b/ios/RNSensitiveInfo/RNSensitiveInfo.m @@ -54,7 +54,7 @@ CFStringRef convertkSecAccessControl(NSString* key){ } // Messages from the comments in -NSString *messageForError(NSError *error) +- (NSString *)messageForError:(NSError *)error { switch (error.code) { case errSecUnimplemented: @@ -128,7 +128,7 @@ CFStringRef convertkSecAccessControl(NSString* key){ osStatus = SecItemAdd((__bridge CFDictionaryRef) query, NULL); if (osStatus != noErr) { NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:osStatus userInfo:nil]; - reject([NSString stringWithFormat:@"%ld",(long)error.code], messageForError(error), nil); + reject([NSString stringWithFormat:@"%ld",(long)error.code], [self messageForError:error], nil); return; } resolve(nil); @@ -161,7 +161,7 @@ CFStringRef convertkSecAccessControl(NSString* key){ if (osStatus != noErr && osStatus != errSecItemNotFound) { NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:osStatus userInfo:nil]; - reject([NSString stringWithFormat:@"%ld",(long)error.code], messageForError(error), nil); + reject([NSString stringWithFormat:@"%ld",(long)error.code], [self messageForError:error], nil); return; } @@ -250,7 +250,7 @@ CFStringRef convertkSecAccessControl(NSString* key){ OSStatus osStatus = SecItemDelete((__bridge CFDictionaryRef) query); if (osStatus != noErr && osStatus != errSecItemNotFound) { NSError *error = [NSError errorWithDomain:NSOSStatusErrorDomain code:osStatus userInfo:nil]; - reject([NSString stringWithFormat:@"%ld",(long)error.code], messageForError(error), nil); + reject([NSString stringWithFormat:@"%ld",(long)error.code], [self messageForError:error], nil); return; } resolve(nil);