Closed JinYuSha0 closed 3 years ago
I solved the problem, because i used --targetBinaryVersion param, and set it value "*"
if ([[CodePushUpdateUtils modifiedDateStringOfFileAtURL:binaryBundleURL] isEqualToString:packageDate] && ([CodePush isUsingTestConfiguration] ||[binaryAppVersion isEqualToString:packageAppVersion])) {
// Return package file because it is newer than the app store binary's JS bundle
NSURL *packageUrl = [[NSURL alloc] initFileURLWithPath:packageFile];
CPLog(logMessageFormat, packageUrl);
isRunningBinaryVersion = NO;
return packageUrl;
} else {
BOOL isRelease = NO;
#ifndef DEBUG
isRelease = YES;
#endif
if (isRelease || ![binaryAppVersion isEqualToString:packageAppVersion]) {
[CodePush clearUpdates];
}
CPLog(logMessageFormat, binaryBundleURL);
isRunningBinaryVersion = YES;
return binaryBundleURL;
}
It can lead to binaryAppVersion(1.0) is not equal packageAppVersion(*) and clearUpdates just set --targetBinaryVersion param value to current app version then solved
Hi guys, I'm still facing the same issue only on iOS. I'm sure that I setup everything correctly since I use the same config for another project that is running on "react-native": "0.67.4"
and it works perfectly.
"react-native": "0.68.2", "react-native-code-push": "^7.0.5"
appcenter codepush release-react -a ${APP_CENTER_ORGANIZATION}/${APP_CENTER_IDENTIFIER_IOS} -d ${APP_ENV_MODE} -t ${APP_VERSION} --token ${APP_CENTER_TOKEN}
useEffect(() => {
if (isLoadingComplete) {
CodePush.sync({
deploymentKey:
Platform.OS === 'ios'
? appConfigs?.CODE_PUSH_KEY_IOS
: appConfigs?.CODE_PUSH_KEY_ANDROID,
updateDialog: false,
installMode: CodePush.InstallMode.IMMEDIATE,
});
}
}, [isLoadingComplete]);
Any helps guys? Really appreciate it
code-push release-react my-app ios --des "bug-fix 2023/9/5 15:45:02-dev" --m true -d Production -t 1.0.11
still has problem
Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):
Steps to Reproduce
1.launch app
Part of code
RNServer.h
RNServer.m
RNBridge.m
AppDelegate.swift
useCodePush.ts
Environment