File tree 3 files changed +8
-3
lines changed
android/app/src/main/java/com/microsoft/codepush/react
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ async function checkForUpdate(deploymentKey = null) {
40
40
* in any updates for current app store version, regardless of hash.
41
41
*/
42
42
let queryPackage ;
43
- if ( localPackage && localPackage . appVersion && localPackage . appVersion === config . appVersion ) {
43
+ if ( localPackage ) {
44
44
queryPackage = localPackage ;
45
45
} else {
46
46
queryPackage = { appVersion : config . appVersion } ;
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ public String getBundleUrl(String assetsBundleFileName) {
162
162
} else {
163
163
// The binary version is newer.
164
164
didUpdate = false ;
165
- if (!this .isDebugMode ) {
165
+ if (!this .isDebugMode || ! this . appVersion . equals ( packageAppVersion ) ) {
166
166
this .clearUpdates ();
167
167
}
168
168
Original file line number Diff line number Diff line change @@ -100,10 +100,15 @@ + (NSURL *)bundleURLForResource:(NSString *)resourceName
100
100
isRunningBinaryVersion = NO ;
101
101
return packageUrl;
102
102
} else {
103
+ BOOL isRelease = NO ;
103
104
#ifndef DEBUG
104
- [CodePush clearUpdates ] ;
105
+ isRelease = YES ;
105
106
#endif
106
107
108
+ if (isRelease || ![binaryAppVersion isEqualToString: packageAppVersion]) {
109
+ [CodePush clearUpdates ];
110
+ }
111
+
107
112
NSLog (logMessageFormat, binaryBundleURL);
108
113
isRunningBinaryVersion = YES ;
109
114
return binaryBundleURL;
You can’t perform that action at this time.
0 commit comments