Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 | 5x 35x 35x | import { ConfigPlugin, withPlugins } from 'expo/config-plugins';
import { withDeepLinks } from './withDeepLinks';
import {
type ConfigPluginProps,
type ConfigPluginPropsWithDefaults,
} from './withIterable.types';
import { withPushNotifications } from './withPushNotifications';
import { withStoreConfigValues } from './withStoreConfigValues';
const withIterable: ConfigPlugin<ConfigPluginProps> = (config, props = {}) => {
// Set default values for props
const propsWithDefaults: ConfigPluginPropsWithDefaults = {
...props,
appEnvironment: props.appEnvironment ?? 'development',
autoConfigurePushNotifications:
props.autoConfigurePushNotifications ?? true,
enableTimeSensitivePush: props.enableTimeSensitivePush ?? true,
requestPermissionsForPushNotifications:
props.requestPermissionsForPushNotifications ?? false,
};
return withPlugins(config, [
[withStoreConfigValues, propsWithDefaults],
[withPushNotifications, propsWithDefaults],
[withDeepLinks, propsWithDefaults],
]);
};
export default withIterable;
|