I’ve been building with React Native for a few months now. For the deployment part we have used CopePush. The post will give you my react native and codepush experience insights, as well as some of major issues I came across.
What is CodePush?
CodePush is a cloud service that enables Cordova and React Native developers to deploy mobile app updates directly to their users’ devices.
How it works?
It works by acting as a central repository that developers can publish certain updates to (e.g. JS, HTML, CSS and image changes), and that apps can query for updates from (using our provided client SDKs). This allows you to have a more deterministic and direct engagement model with your end-users, while addressing bugs and/or adding small features that don’t require you to re-build a binary and/or re-distribute it through any public app stores.
Getting Started
1 – Install the CodePush CLI
npm install -g code-push-cli
2 – Create a CodePush account
code-push register
3 – CodePush your mobile client
Add the appropriate CodePush client SDKs to your app, and configure them to query for updates against the app deployment created above.
Follow the app type specific details here:
4 – Release an app update
code-push release-react <appName> <platform>
CodePush Disadvantages
Of course there is a lot room for improvement!
@mscodepush –> ⚠️ warning No.1#Codepush release-react command can only release one platform at a time #reactjs #reactnative
— ★Panayiotis Georgiou (@panay_georgiou) July 13, 2017
A major problem that we came across was the simultaneous releases on Android and iOS platforms. Codepush can no support release for both platforms and therefore the only way around is to specify a release for each platform.
After searching the web I have found that is a problem occurred in many people and that’s the reason I have decided to write this post.
https://github.com/Microsoft/react-native-code-push/issues/802
https://github.com/Microsoft/react-native-code-push/issues/790
***https://github.com/Microsoft/react-native-code-push/issues/569
@mscodepush –> ⚠️ warnings No.2#Codepush Android bundle release to an iOS app, or vice versa, will be silently rejected by our SDK#React
— ★Panayiotis Georgiou (@panay_georgiou) July 13, 2017
React Native and CodePush Experience
Codepush is a very useful tool especially for javascript developers in case they need to push code and not need to upload a new apk in play or ipm file in appstore. Which makes it very handy as you sent the updated code over to the app either silently or with a nice modal to the user to update to the current codepush version.
[alert type=white ]
Check out
[/alert]
Follow me on Instagram
Follow Panayiotis Georgiou on Facebook, Twitter, Google+, and YouTube