Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 655c9f7

Browse files
author
Will Anderson
committed
Use the rollbackTimeout param in the example app
1 parent 71b116a commit 655c9f7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Examples/CodePushDemoApp/index.ios.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,20 @@ var CodePush = require('react-native-code-push');
1919

2020
var CodePushDemoApp = React.createClass({
2121
componentDidMount: function() {
22-
this.fetchData();
22+
this.checkUpdate();
2323
},
24-
fetchData: function() {
24+
checkUpdate: function() {
2525
CodePush.checkForUpdate().done((update) => {
2626
this.setState({ update: update });
2727
});
28+
CodePush.notifyApplicationReady().done();
2829
},
2930
getInitialState: function() {
3031
return { update: false };
3132
},
3233
handlePress: function() {
3334
this.state.update.download().done((localPackage) => {
34-
localPackage.apply().done();
35+
localPackage.apply(1000).done();
3536
});
3637
},
3738
render: function() {

0 commit comments

Comments
 (0)