Skip to content

Commit

Permalink
Merge pull request #37 from Clovel/fix/iosUpdateException
Browse files Browse the repository at this point in the history
Fixed iOS CodePush install when there is no public key specified
  • Loading branch information
leo6104 authored Jul 8, 2021
2 parents 112a3ff + 03df158 commit e85db70
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ios/Plugin/CodePush.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e85db70

Please sign in to comment.