I'm trying to create a basic iOS-app based on ReactNative using Electrode (Walmart - http://www.electrode.io/site/docs/introduction.html)
While I can get the app to work locally on my Mac, I'm struggling to understand how the whole Over-The-Air (OTA) update can/should work.
Here's what I've done so far
- created a mini-app using ern create-miniapp TestApp
- created a GIT-repository on BitBucket
- created a Cauldron using ern cauldron repo add TestApp [Bitbucket-url]
- added a nativeapp using ern cauldron add native app TestApp
But when I run the app using ern run-ios, it still seems to point towards my local machine (I can update the index-ios.js-file and it updates in the app). So what is lacking for getting the whole OTA-setup going where another programmer can updates the index-ios.js-file in the cloud/bitbucket (I'm guessing) and update the app on the fly?
I ended up getting it to work on a 2nd try - The notes I've made underways is the following:
I searched around the net and used a bit here and there, so can't really point you to one simple guide..
PreRequisites
https://brew.sh/
brew install node
brew install watchman
npm install -g react-native-cli
Npm install -g code-push-cli
Code-push register
(complete registration, validate by running this command again and it should say: [Error] You are already logged in from this machine.)
react-native init [AppName] Cd [AppName] npm install —save react-native-code-push Npm install (something goes wrong when installing code-push, so we have to reinstall some react-native elements)
code-push app add ReactApp ios react-native (Copy production deployment key)
React-native link react-native-code-push (Enter production deployment key)
import codePush from 'react-native-code-push'
(Remove "export default" from main App class)
export default codePush(codePushOptions)(App);
code-push release-react ReactApp ios --deploymentName Production
code-push deployment ls ReactApp -k