小编sag*_*van的帖子

React-native Javascript 通过 codepush 进行的更改未反映在 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);
Run Code Online (Sandbox Code Playgroud)

并在 iOS Swift 中从 javascript 加载组件:

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

ios swift react-native code-push

2
推荐指数
1
解决办法
1183
查看次数

标签 统计

code-push ×1

ios ×1

react-native ×1

swift ×1