diff --git a/ios/RCTHotUpdate/RCTHotUpdate.m b/ios/RCTHotUpdate/RCTHotUpdate.m index 836035e..fd41e96 100644 --- a/ios/RCTHotUpdate/RCTHotUpdate.m +++ b/ios/RCTHotUpdate/RCTHotUpdate.m @@ -176,7 +176,7 @@ RCT_EXPORT_METHOD(downloadUpdate:(NSDictionary *)options { [self hotUpdate:HotUpdateTypeFullDownload options:options callback:^(NSError *error) { if (error) { - [reject error]; + reject([NSString stringWithFormat: @"%lu", (long)error.code], error.localizedDescription, error); } else { resolve(nil); @@ -190,7 +190,7 @@ RCT_EXPORT_METHOD(downloadPatchFromPackage:(NSDictionary *)options { [self hotUpdate:HotUpdateTypePatchFromPackage options:options callback:^(NSError *error) { if (error) { - [reject error]; + reject([NSString stringWithFormat: @"%lu", (long)error.code], error.localizedDescription, error); } else { resolve(nil); @@ -204,7 +204,7 @@ RCT_EXPORT_METHOD(downloadPatchFromPpk:(NSDictionary *)options { [self hotUpdate:HotUpdateTypePatchFromPpk options:options callback:^(NSError *error) { if (error) { - [reject error]; + reject([NSString stringWithFormat: @"%lu", (long)error.code], error.localizedDescription, error); } else { resolve(nil); diff --git a/package.json b/package.json index 5f96229..f215c1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-update", - "version": "1.0.3", + "version": "1.0.4", "description": "react-native hot update", "main": "lib/index.js", "scripts": {