mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-13 01:18:56 +08:00
Use configuration to get appVersion when checking for updates
This commit is contained in:
@@ -40,9 +40,13 @@ function getSdk(callback) {
|
||||
}
|
||||
|
||||
function queryUpdate(callback) {
|
||||
getSdk(function(err, sdk) {
|
||||
var pkg = {appVersion: "1.2.3"};
|
||||
sdk.queryUpdateWithCurrentPackage(pkg, callback);
|
||||
getConfiguration(function(err, configuration) {
|
||||
if (err) callback(err);
|
||||
getSdk(function(err, sdk) {
|
||||
if (err) callback(err);
|
||||
var pkg = {appVersion: configuration.appVersion};
|
||||
sdk.queryUpdateWithCurrentPackage(pkg, callback);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user