I need use code-push service in react-native on iOS platform. Version is 1.17.3-beta.
Local already deployed code-push service. then run the command line to import code-push plug-in.
As shown below.
npm install --save react-native-code-push
react-native link react-native-code-push
Loading code-push module in js.
import codePush from 'react-native-code-push'
There is a problem. prompt codePush
is undefined. And I can not call apis for example checkForUpdate()
sync()
.
componentDidMount(){
AppState.addEventListener("change", (newState) => {
newState === "active" && codePush.sync();
});
},
The documents of code-push can be found in node_modules directory,but why not be identified ?
Can any one help please ? Thanks.