Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit e85db70

Browse files
authored
Merge pull request #37 from Clovel/fix/iosUpdateException
Fixed iOS CodePush install when there is no public key specified
2 parents 112a3ff + 03df158 commit e85db70

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ios/Plugin/CodePush.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ - (void)getPackageHash:(CAPPluginCall *)call {
8585

8686
- (void)getPublicKey:(CAPPluginCall *)call {
8787
NSString *publicKey = [self getConfigValue:PublicKeyPreference];
88-
[call resolve:@{@"value":publicKey}];
88+
if (!publicKey) {
89+
[call resolve:nil]; /* Returning @{@"value":nil} causes an uncaught exception */
90+
} else {
91+
[call resolve:@{@"value":publicKey}];
92+
}
8993
}
9094

9195
- (void)decodeSignature:(CAPPluginCall *)call {

0 commit comments

Comments
 (0)