1 | // @flow
|
2 |
|
3 | import {
|
4 | NativeModules,
|
5 | } from 'react-native';
|
6 |
|
7 | // On Android we pass the manifest in JSON form so this step is necessary
|
8 | let { ExponentConstants } = NativeModules;
|
9 |
|
10 | let manifest;
|
11 | if (ExponentConstants && ExponentConstants.manifest) {
|
12 | manifest = NativeModules.ExponentConstants.manifest;
|
13 | if (typeof manifest === 'string') {
|
14 | manifest = JSON.parse(manifest);
|
15 | }
|
16 | }
|
17 |
|
18 | module.exports = {
|
19 | ...NativeModules.ExponentConstants,
|
20 | manifest,
|
21 | };
|