You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently encountered that it is not that straightforward to deploy CodePush updates if you use rnx-kit bundling. CodePush is using a shorthand command appcenter codepush release-react that also runs the bundle command on its own which is not working if we're building the bundle ourselves. Maybe it would be worth to include these in the bundling docs? Here is how I solved it:
# Android
# create the bundle - this outputs the bundle and resources into a folder called dist
yarn bundle
# create the CodePush dir
mkdir CodePush
# this is using the Hermes bundle but you can replace this with your regular bundle if you do not use Hermes
cp dist/main.android.bundle.hbc CodePush/index.android.bundle
# this is using the Hermes sourcemap but you can replace this with your regular sourcemap if you do not use Hermes
cp dist/main.android.bundle.hbc.map CodePush/index.android.bundle.map
# copy the content of the res folder straight into the CodePush folder
cp -R dist/res/* CodePush
# send the update to codepush
appcenter codepush release --update-contents-path CodePush # include your other flags
# iOS
# create the bundle - this outputs the bundle and resources into a folder called dist
yarn bundle
# create the CodePush dir
mkdir CodePush
# this is using the Hermes bundle but you can replace this with your regular bundle if you do not use Hermes
cp dist/main.ios.jsbundle.hbc CodePush/main.jsbundle
# this is using the Hermes sourcemap but you can replace this with your regular sourcemap if you do not use Hermes
cp dist/main.ios.jsbundle.hbc.map CodePush/main.jsbundle.map
# copy the assets folder into the CodePush folder
cp -r dist/assets CodePush/assets
# send the update to codepush
appcenter codepush release --update-contents-path CodePush # include your other flags
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've recently encountered that it is not that straightforward to deploy CodePush updates if you use rnx-kit bundling. CodePush is using a shorthand command
appcenter codepush release-react
that also runs the bundle command on its own which is not working if we're building the bundle ourselves. Maybe it would be worth to include these in the bundling docs? Here is how I solved it:Beta Was this translation helpful? Give feedback.
All reactions