1import { ConfigPlugin, createRunOncePlugin } from '@expo/config-plugins'; 2 3import { withNotificationsAndroid } from './withNotificationsAndroid'; 4import { withNotificationsIOS } from './withNotificationsIOS'; 5 6const pkg = require('expo-notifications/package.json'); 7 8export type NotificationsPluginProps = { 9 /** 10 * (Android only) Local path to an image to use as the icon for push notifications. 11 * 96x96 all-white png with transparency. We recommend following 12 * [Google's design guidelines](https://material.io/design/iconography/product-icons.html#design-principles). 13 */ 14 icon?: string; 15 /** 16 * (Android only) Tint color for the push notification image when it appears in the notification tray. 17 * @default '#ffffff' 18 */ 19 color?: string; 20 /** 21 * Array of local paths to sound files (.wav recommended) that can be used as custom notification sounds. 22 */ 23 sounds?: string[]; 24 /** 25 * (iOS only) Environment of the app: either 'development' or 'production'. Defaults to 'development'. 26 * @default 'development' 27 */ 28 mode?: 'development' | 'production'; 29}; 30 31const withNotifications: ConfigPlugin<NotificationsPluginProps | void> = (config, props) => { 32 config = withNotificationsAndroid(config, props || {}); 33 config = withNotificationsIOS(config, props || {}); 34 return config; 35}; 36 37export default createRunOncePlugin(withNotifications, pkg.name, pkg.version); 38