Gilad Artzi
Gilad Artzi

Reputation: 3084

CodePush - Releasing an iOS bundle breaks Android and vice versa

Using react-native-code-push.

Whenever I release an iOS version (using code-push release-react ... ios), it breaks my Android code push. Next time I try to get an update I get the following error:

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

Then, if I release an Android version, it breaks my iOS, getting this error:

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.

It's very strange and the documentation doesn't say anything about collisions between the two platforms.

Upvotes: 2

Views: 1085

Answers (1)

Mads Lee Jensen
Mads Lee Jensen

Reputation: 4658

You need to setup an app for each platform

code-push app add [name]-ios

code-push app add [name]-android

i think the code-push release-react [app-name] [platform] ... the platform argument only tells the react-native bundler what entry file to use (index.ios.js or index.android.js) it doesnt work as "install only on ios"

Upvotes: 3

Related Questions