-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.ios.js
51 lines (41 loc) · 1.18 KB
/
index.ios.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
import AppLayout from './src/app/AppLayout';
import AppNavigator from './src/app/AppNavigator';
import configureStore from './src/app/AppStore';
import CodePush from "react-native-code-push";
const AppStore = configureStore();
class App extends Component {
componentDidMount() {
var updateDialogOptions = {
optionalUpdateTitle: "Mise à Jour disponible",
optionalUpdateMessage: "Souhaitez-vous mettre à jour votre application ?",
optionalIgnoreButtonLabel: "Non",
optionalInstallButtonLabel: "Oui",
};
CodePush.sync({updateDialog: updateDialogOptions, installMode: CodePush.InstallMode.IMMEDIATE})
.then(update => console.log('update', update))
.catch(err => console.log('update error', err));
}
render() {
return (
<Provider store={AppStore} >
<AppLayout>
<AppNavigator />
</AppLayout>
</Provider>
);
}
}
AppRegistry.registerComponent('bimbot', () => App);