2016-11-14 85 views
2

使用react-native-code-pushCodePush - 發佈iOS套件打破Android,反之亦然

無論何時我發佈iOS版本(使用code-push release-react ... ios),它都會破壞我的Android代碼推送。下一次,我試圖得到更新,我得到以下錯誤:

You attempted to set the key isPending with the value true on an object that is meant to be immutable and has been frozen.

然後,如果我發佈了Android版本,它打破了我的iOS,收到此錯誤:

Update is invalid - A JS bundle file named "main.jsbundle" could not be found within the downloaded contents. Please ensure that your app is syncing with the correct deployment and that you are releasing your CodePush updates using the exact same JS bundle file name that was shipped with your app's binary.

這是非常奇怪的,該文檔沒有說明兩個平臺之間的衝突。

回答

2

你需要安裝一個應用程序爲每個平臺

code-push app add [name]-ios

code-push app add [name]-android

我認爲code-push release-react [app-name] [platform] ...平臺參數只告訴了反應本地打捆使用何種入口文件(index.ios .js或index.android.js)它不工作爲「僅安裝在ios上」