React-native Javascript 通过 codepush 进行的更改未反映在 iPhone

React-native Javascript changes through codepush not getting reflected on iPhone

我的 iOS 应用没有通过 CodePush 更新。

我在我的 iOS 应用程序中添加了 CodePush 依赖项。此外,我还能够使用 CodePush 成功发布对 AppCenter 的更新。但是我的 iOS 应用中的更改没有更新。

我的 React-Native 模块代码如下:

const codePushOptions = {
    checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
    installMode: codePush.InstallMode.ON_NEXT_RESUME,
};
export default Dashboard = codePush(codePushOptions)(Dashboard);

并从 javascript 加载组件 iOS Swift:

let jsCodeLocation = CodePush.bundleURL()!
let addRatingView = RCTRootView(bundleURL:jsCodeLocation as URL!, moduleName: "Dashboard", initialProperties: nil, launchOptions:nil)

我只有 iOS 遇到过同样的问题。请务必在发布更新时插入强制标志“-m”。

appcenter codepush release-react -a <YourName>/<AppName> -d Production -m --description '<Description>'