From 9c2d10c4e5e87008dd7ef219a08ef71c5a341f56 Mon Sep 17 00:00:00 2001 From: Riyaz Date: Sun, 16 Jul 2017 21:09:38 +0530 Subject: [PATCH] minor fixes in readMe and ios function --- README.md | 16 +++++++++------- ios/RNFIRMessaging.m | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c7f0cef..1bd1db6 100644 --- a/README.md +++ b/README.md @@ -372,13 +372,15 @@ class App extends Component { my_custom_data_1: 'my_custom_field_value_1', my_custom_data_2: 'my_custom_field_value_2' }); - - FCM.deleteInstanceId().then(()={ - //Deleted instance id successfully - //This will reset Instance ID and revokes all tokens. - }).catch(error =>{ - //Error while deleting instance id - }) + + FCM.deleteInstanceId() + .then( () => { + //Deleted instance id successfully + //This will reset Instance ID and revokes all tokens. + }) + .catch(error => { + //Error while deleting instance id + }); } } ``` diff --git a/ios/RNFIRMessaging.m b/ios/RNFIRMessaging.m index 94cc0bd..f816f4d 100644 --- a/ios/RNFIRMessaging.m +++ b/ios/RNFIRMessaging.m @@ -236,9 +236,9 @@ RCT_EXPORT_METHOD(deleteInstanceId:(RCTPromiseResolveBlock)resolve rejecter:(RCT [[FIRInstanceID instanceID]deleteIDWithHandler:^(NSError * _Nullable error) { if (error != nil) { - reject([NSString stringWithFormat:@"%ld",error.code],error.localizedDescription,error); + reject([NSString stringWithFormat:@"%ld",error.code],error.localizedDescription,nil); } else { - resolve(NULL); + resolve(nil); } }]; } -- 2.26.2