From 03df1588a2be78606222c36ff0bd1bfe10d6045c Mon Sep 17 00:00:00 2001 From: Clovis Durand Date: Mon, 21 Jun 2021 13:51:16 +0200 Subject: [PATCH] Fixed iOS CodePush install when there is no public key specified Signed-off-by: Clovis Durand --- ios/Plugin/CodePush.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ios/Plugin/CodePush.m b/ios/Plugin/CodePush.m index 3a2c59bf..d27ad4fc 100644 --- a/ios/Plugin/CodePush.m +++ b/ios/Plugin/CodePush.m @@ -85,7 +85,11 @@ - (void)getPackageHash:(CAPPluginCall *)call { - (void)getPublicKey:(CAPPluginCall *)call { NSString *publicKey = [self getConfigValue:PublicKeyPreference]; - [call resolve:@{@"value":publicKey}]; + if (!publicKey) { + [call resolve:nil]; /* Returning @{@"value":nil} causes an uncaught exception */ + } else { + [call resolve:@{@"value":publicKey}]; + } } - (void)decodeSignature:(CAPPluginCall *)call {