Skip to content

Commit

Permalink
Fix update crash by removing download key in mutableUpdatePackage.
Browse files Browse the repository at this point in the history
`download` key is a function and isn't serializable by NSJSONSerialization.
See issue microsoft#816.
  • Loading branch information
peacechen committed May 3, 2017
1 parent 188dd69 commit 21a6ce3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ios/CodePush/CodePushPackage.m
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ + (void)downloadPackage:(NSDictionary *)updatePackage
}
}

[mutableUpdatePackage removeObjectForKey:@"download"];
NSData *updateSerializedData = [NSJSONSerialization dataWithJSONObject:mutableUpdatePackage
options:0
error:&error];
Expand Down Expand Up @@ -535,4 +536,4 @@ + (BOOL)updateCurrentPackageInfo:(NSDictionary *)packageInfo
return YES;
}

@end
@end

0 comments on commit 21a6ce3

Please sign in to comment.