首页 > 解决方案 > 反应本机代码推送不更新已发布 APK 中的更改

问题描述

我做了所有反应本机代码推送的东西。但是当我运行 cmd = "appcenter codepush release-react -a xyz.abc-gmail.com/AppName -d Production" 时。然后我收到消息 =“成功发布了包含“C:\Users\Admin\AppData\Local\Temp\code-push2021519-1588-5sorfr.dahyn\CodePush”目录的更新到“Medicare”的“Production”部署应用程序。”。但安装的 APK 没有任何变化。请帮忙

这是codePush.js

import CodePush from "react-native-code-push";
import React from "react";

const CODE_PUSH_OPTIONS = {
  checkFrequency: CodePush.CheckFrequency.ON_APP_RESUME,
};

const withCodePush = (WrappedComponent) => {
  class WrappedApp extends React.PureComponent {
    componentDidMount() {
      CodePush.sync(
        { installMode: CodePush.InstallMode.IMMEDIATE },
        this.syncWithCodePush,
        null
      );
    }

    syncWithCodePush = (status) => {
      console.log("here is " + status);
    };

    render() {
      return <WrappedComponent />;
    }
  }

  return CodePush(CODE_PUSH_OPTIONS)(WrappedApp);
};
export default withCodePush;

这是 App.js

import withCodePush from "./codePush";


function registrationStackP({ navigation }) {
  return (
    screens......
  );
}

function registrationStackD({ navigation }) {
  return (
    screens......
  );
}

export default withCodePush(App);

请帮忙

标签: androidreact-nativecode-pushreact-native-code-push

解决方案


推荐阅读