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