microsoft / cordova-plugin-code-push

Cordova plugin for CodePush
http://appcenter.ms
Other
643 stars 333 forks source link

LocalPackage object the getPendingPackage method return has no isMandatory property #250

Closed fenglu09 closed 7 years ago

fenglu09 commented 7 years ago

Description

The result of codePush.getPendingPackage() not has isMandatory property on my iOS. image

But the document here write that the LocalPackage has isMandatory property.

Reproduction

My code:

codePush.getPendingPackage(function (update) {
    if (update) {
        console.log(update);
    }
});

Additional Information

max-mironov commented 7 years ago

Hello @fenglu09 - thanks for good catch! Seems that we are missing this property when returning localPackage from getPendingUpdate method. I've added PR to fix it, could you please verify if it works for you?

fenglu09 commented 7 years ago

Thanks for you apply! After add localPackage.isMandatory = metadata.isMandatory; to the localPackage.js, it solved my issue.

max-mironov commented 7 years ago

@fenglu09 you are welcome! Please let us know if you consider the issue could be closed as resolved.

fenglu09 commented 7 years ago

@max-mironov you can close this issue after your pull request is merged.

max-mironov commented 7 years ago

Closing the issue due to PR has been merged to Master. Let us know if you see any issues.