Skip to content

Commit

Permalink
fix: solved error on ios that prevented the creation of the contacts …
Browse files Browse the repository at this point in the history
…module
  • Loading branch information
tylerdgenius committed Jul 29, 2024
1 parent 5d17184 commit db2bd71
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ios/RCTContacts/RCTContacts.m
Original file line number Diff line number Diff line change
Expand Up @@ -1221,9 +1221,13 @@ + (NSData*) loadImageAsset:(NSURL*)assetURL {
}
}

RCT_EXPORT_METHOD(writePhotoToPath:(RCTResponseSenderBlock) rejecter:(RCTPromiseRejectBlock) reject)
RCT_EXPORT_METHOD(writePhotoToPath:(nonnull NSString *)path resolver:(RCTPromiseResolveBlock) resolve rejecter:(RCTPromiseRejectBlock) reject)
{
reject(@"Error", @"not implemented", nil);
@try {
//Nothing is implemented here

This comment has been minimized.

Copy link
@Sky

Sky Sep 17, 2024

There should be call to either resolve or reject in each branch of logic otherwise caller may stuck waiting for result

} @catch (NSException *exception) {
reject(@"Error", @"not implemented", nil);
}
}

-(CNContactStore*) contactsStore: (RCTPromiseRejectBlock) reject {
Expand Down

0 comments on commit db2bd71

Please sign in to comment.