I've followed the instructions to set up CodePush properly. First, I push to AppCenter:
$ appcenter codepush release-react -a myUser/appName -d Production
Detecting ios app version:
Using the target binary version value "1.0" from "ios/reactnative/Info.plist".
Running "react-native bundle" command:
node node_modules/react-native/local-cli/cli.js bundle --assets-dest /var/folders/gy/737c70fj7tq3pwdw758glxz00000gp/T/code-push118924-95814-1e6qqdj.df3g/CodePush --bundle-output /var/folders/gy/737c70fj7tq3pwdw758glxz00000gp/T/code-push118924-95814-1e6qqdj.df3g/CodePush/main.jsbundle --dev false --entry-file index.js --platform ios
Loading dependency graph, done.
bundle: Writing bundle output to: /var/folders/gy/737c70fj7tq3pwdw758glxz00000gp/T/code-push118924-95814-1e6qqdj.df3g/CodePush/main.jsbundle
bundle: Done writing bundle output
bundle: Copying 6 asset files
bundle: Done copying assets
Releasing update contents to CodePush:
Successfully released an update containing the "/var/folders/gy/737c70fj7tq3pwdw758glxz00000gp/T/code-push118924-95814-1e6qqdj.df3g/CodePush" directory to the "Production" deployment of the "appName" app.
Second, I go to the AppCenter website, select the successfully pushed version, and do a force roll out to every app.
I've tried to restart the app, reinstall the app, etc...but the app does not update from CodePush servers.
In my XCode console, I see:
loading - codepush2018-10-24 12:10:10.837955+0200 reactnative[5546:3916480]
[CodePush] Loading JS bundle from file:///Users/myUser/Library/Developer/CoreSimulator/Devices/4E7D0B07-B6B2-4D3C-B5B8-F28F3DA47077/data/Containers/Bundle/Application/081FD17C-B182-488D-B2D1-C786A3B25AAB/reactnative.app/main.jsbundle
Does this mean that CodePush is loading from local?
I believe I am running the release
scheme correctly:
class App extends React.Component {
constructor(props){
super(props)
}
componentDidMount() {
codePush.sync({
updateDialog: true,
installMode: codePush.InstallMode.IMMEDIATE
});
}
render(){
return <Main screenProps={this.props} />
}
}
const codePushOptions = { checkFrequency: codePush.CheckFrequency.ON_APP_RESUME };
const ConnectedApp = codePush(codePushOptions)(connect(state => state)(App))
firebase.auth().onAuthStateChanged(auth => {
if(auth){
store.dispatch(setUser(auth))
}else{
store.dispatch(logout())
}
})
export default () => (
<Provider store={store}>
<ConnectedApp />
</Provider>
)
I also do not see the updateDialog: true
when App mounts.