1// To prebuild:
2// 1. `npm pack` in `../../templates/expo-template-bare-minimum`
3// 2. `EXPO_SDK_VERSION=43.0.0 expo prebuild --clean --template --no-install ../../templates/expo-template-bare-minimum/expo-template-bare-minimum-42.0.0.tgz`
4//   - This can be debugged with `EXPO_DEBUG=1` and `DEBUG=expo:*`
5// 3. `pod install` in the ios folder. Do this in its own step since direnv may break your cocoapods install.
6// 4. `EXPO_SDK_VERSION=43.0.0 expo run:ios --no-install`
7//   - This can be debugged with `EXPO_DEBUG=1` and `DEBUG=expo:*`
8// 5. `EXPO_SDK_VERSION=43.0.0 expo run:android`
9export default ({ config }) => {
10  config.version = '43.0.0';
11  // app.json defines the sdkVersion as UNVERSIONED, we can override it here dynamically if we need to,
12  // for example with an environment variable.
13  if (process.env.EXPO_SDK_VERSION) {
14    config.sdkVersion = process.env.EXPO_SDK_VERSION;
15  }
16  config.plugins = [
17    // iOS plugins
18    // Add a plugin to modify the AppDelegate.
19    './plugins/withNotFoundModule',
20    // Add the React DevMenu back to the client.
21    './plugins/withDevMenu',
22    // Add AsyncStorage
23    './plugins/withExpoAsyncStorage',
24
25    // Android plugins
26
27    // expo-modules-test-core requires kotlin, so additional setup must be executed.
28    'expo-modules-test-core',
29    [
30      './plugins/withGradleProperties',
31      {
32        // Increase default java VM size so it can handle building all the Expo packages.
33        'org.gradle.jvmargs':
34          '-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8',
35      },
36    ],
37    [
38      // expo-modules-test-core must be added manually.
39      './plugins/withSettingsImport',
40      {
41        packageName: 'expo-modules-test-core',
42        packagePath: '../../../packages/expo-modules-test-core/android',
43      },
44    ],
45  ];
46
47  config.plugins.push([
48    'expo-document-picker',
49    {
50      appleTeamId: 'XXXXXX',
51    },
52  ]);
53
54  config.plugins.push([
55    'expo-notifications',
56    {
57      icon: './assets/icons/notificationIcon.png',
58      color: '#5539cc',
59      sounds: ['./assets/sounds/cat.wav'],
60    },
61  ]);
62
63  // The dev client plugins shouldn't be installed
64  config._internal.pluginHistory = {
65    // expo-dev-launcher causes prebuild to freeze on a find/replace.
66    'expo-dev-launcher': {},
67    'expo-dev-menu': {},
68    'expo-dev-client': {},
69  };
70
71  return config;
72};
73