桥未设置。这可能是因为您已经在 CodePush 中显式合成了桥,即使它是从 RCTEventEmitter 继承的

khu*_*lka 7 javascript ios react-native code-push react-native-ios

我得到的错误是这样的:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error when sending event: CodePushDownloadProgress with body: {
    receivedBytes = 1965637;
    totalBytes = 1965637;
}. Bridge is not set. This is probably because you've explicitly synthesized the bridge in CodePush, even though it's inherited from RCTEventEmitter.'
Run Code Online (Sandbox Code Playgroud)

这就是我包装 React 组件的方式:

export default CodePush(
    {
        updateDialog: false,
        checkFrequency: CodePush.CheckFrequency.ON_APP_RESUME,
        installMode: CodePush.InstallMode.ON_NEXT_RESTART
    },
)(App);
Run Code Online (Sandbox Code Playgroud)

有人知道如何修复吗?