diff --git a/ios/RNSensitiveInfo/RNSensitiveInfo.m b/ios/RNSensitiveInfo/RNSensitiveInfo.m index dd841621..e67da557 100644 --- a/ios/RNSensitiveInfo/RNSensitiveInfo.m +++ b/ios/RNSensitiveInfo/RNSensitiveInfo.m @@ -216,13 +216,13 @@ - (NSString *)messageForError:(NSError *)error } dispatch_async(dispatch_get_main_queue(), ^{ - if (UIApplication.sharedApplication.protectedDataAvailable) { + // if (UIApplication.sharedApplication.protectedDataAvailable) { [self getItemWithQuery:query resolver:resolve rejecter:reject]; - } else { - // TODO: could change to instead of erroring out, listen for protectedDataDidBecomeAvailable and call getItemWIthQuery when it does - // Experiment for now by returning an error and let the js side retry - reject(@"protected_data_unavailable", @"Protected data not available yet. Retry operation", nil); - } + // } else { + // // TODO: could change to instead of erroring out, listen for protectedDataDidBecomeAvailable and call getItemWIthQuery when it does + // // Experiment for now by returning an error and let the js side retry + // reject(@"protected_data_unavailable", @"Protected data not available yet. Retry operation", nil); + // } }); } @@ -243,7 +243,7 @@ - (NSString *)messageForError:(NSError *)error dispatch_async(dispatch_get_main_queue(), ^{ - if (UIApplication.sharedApplication.protectedDataAvailable) { + // if (UIApplication.sharedApplication.protectedDataAvailable) { // Look up server in the keychain NSDictionary* found = nil; CFTypeRef foundTypeRef = NULL; @@ -262,11 +262,11 @@ - (NSString *)messageForError:(NSError *)error // Found resolve(@(TRUE)); } - } else { - // TODO: could change to instead of erroring out, listen for protectedDataDidBecomeAvailable and call getItemWIthQuery when it does - // Experiment for now by returning an error and let the js side retry - reject(@"protected_data_unavailable", @"Protected data not available yet. Retry operation", nil); - } + // } else { + // // TODO: could change to instead of erroring out, listen for protectedDataDidBecomeAvailable and call getItemWIthQuery when it does + // // Experiment for now by returning an error and let the js side retry + // reject(@"protected_data_unavailable", @"Protected data not available yet. Retry operation", nil); + // } }); } diff --git a/react-native-sensitive-info.podspec b/react-native-sensitive-info.podspec index 8a2200b4..0d51d850 100644 --- a/react-native-sensitive-info.podspec +++ b/react-native-sensitive-info.podspec @@ -10,7 +10,7 @@ Pod::Spec.new do |s| s.authors = package['author'] s.homepage = package['homepage'] - s.platforms = { :ios => "8.0" } + s.platforms = { :ios => "8.0", :osx => "10.15" } s.source = { :git => "https://github.com/mCodex/react-native-sensitive-info", :tag => "v#{s.version}" } s.source_files = "ios/**/*.{h,m}"