{"id":17593834,"url":"https://github.com/lunatiquecoder/expo-notifee-plugin","last_synced_at":"2025-04-30T06:26:50.893Z","repository":{"id":257821756,"uuid":"870360405","full_name":"LunatiqueCoder/expo-notifee-plugin","owner":"LunatiqueCoder","description":"Expo plugin that configures a Notification Service Extension to use Notifee for remote notifications","archived":false,"fork":false,"pushed_at":"2024-10-29T19:29:05.000Z","size":820,"stargazers_count":16,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-25T19:45:53.595Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LunatiqueCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-09T22:39:22.000Z","updated_at":"2024-12-19T22:37:09.000Z","dependencies_parsed_at":"2024-10-11T11:50:23.929Z","dependency_job_id":"088c7d04-6923-4a91-a89a-890ab42decca","html_url":"https://github.com/LunatiqueCoder/expo-notifee-plugin","commit_stats":null,"previous_names":["lunatiquecoder/expo-notifee-remote-plugin"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunatiqueCoder%2Fexpo-notifee-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunatiqueCoder%2Fexpo-notifee-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunatiqueCoder%2Fexpo-notifee-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LunatiqueCoder%2Fexpo-notifee-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LunatiqueCoder","download_url":"https://codeload.github.com/LunatiqueCoder/expo-notifee-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232020709,"owners_count":18461400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-22T06:24:58.449Z","updated_at":"2024-12-31T19:12:22.134Z","avatar_url":"https://github.com/LunatiqueCoder.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🖲 expo-notifee-plugin\n\n[![Expo][34]][35]\n![platforms][7]\n[![GitHub][9]][10]\n[![npm][13]][14]\n\n## ⭐️ Features\n### iOS\n- [x] [Remote Notification Support][20]\n- [x] [Sounds][21]\n\n### Android\n- [ ] [Icons][22]\n- [ ] [Sounds][23]\n\n[20]: https://notifee.app/react-native/docs/ios/remote-notification-support\n[21]: https://notifee.app/react-native/reference/notificationios#sound\n[22]: https://notifee.app/react-native/docs/android/appearance#icons\n[23]: https://notifee.app/react-native/docs/android/behaviour#custom-sound\n\n##  🔧 Installation\n### Yarn:\n```\nyarn add expo-notifee-plugin\n```\n### NPM:\n```\nnpm install --save expo-notifee-plugin\n```\n\n## 🎛 Setup\n1. Add it to your [`plugins`](https://docs.expo.dev/config-plugins/introduction/#use-a-config-plugin) in your `app.json` file:  \n\n```json\n{\n  \"expo\": {\n    \"plugins\": [\n      [\n        \"expo-notifee-plugin\",\n        {\n          \"developmentTeam\": \"MYDEVTEAMID\"\n        }\n      ]\n    ]\n  }\n}\n```\n\n\n2. Run `npx expo prebuild -p ios`\n3. Run `yarn ios`\n\n\n### Types\n\nIf you use [`app.config.ts`](https://docs.expo.dev/workflow/configuration/#using-typescript-for-configuration-appconfigts-instead-of-appconfigjs) for example:\n\n```ts\n\nimport { ExpoConfig } from 'expo/config';\nimport { TExpoNotifeeRemote } from 'expo-notifee-plugin';\n\nconst notifeeOptions: TExpoNotifeeRemote = {\n  /**\n   * Apple App Groups. If none specified, it will create one: `group.${bundleIdentifier}`.\n   * @example appGroups: ['com.app.company']\n   * @link https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_application-groups\n   */\n  appGroups: string[];\n  /**\n   * @description\n   * Use a custom relative (from project root) path for the NotifeeNotificationService.\n   * - You can adapt `expo-notifee-plugin/ios/NotifeeNotificationService.swift`\n   * - Warning! It should be named `NotifeeNotificationService`! Doesn't matter if you use\n   * Swift or Objective-C!\n   *\n   * @examples\n   * - src/notifications/NotifeeNotificationService.swift\n   * - src/notifications/NotifeeNotificationService.m\n   */\n  customNotificationServicePath?: string;\n  developmentTeam: string;\n  /**\n   * An array containing the sound file names (including file extensions)\n   * @example soundFiles: ['dm.aiff']\n   * */\n  soundFiles?: string[];\n  /** Path of the folder that contains the sound. Relative to the app.config.js file.\n   * @example soundFilesPath: 'assets/audio'\n   */\n  soundFilesPath?: string;\n};\n\nexport const plugins: ExpoConfig['plugins'] = [\n  'expo-localization',\n  ['expo-screen-orientation', { initialOrientation: 'PORTRAIT_UP' }],\n  '@react-native-firebase/app',\n  ['expo-notifee-plugin', notifeeOptions],\n];\n\n```\n\n## 🛸 Usage\n\n\nExample with Firebase Node SDK:\n\n\n```ts\nimport type {Notification} from '@notifee/react-native/src/types/Notification';\nimport {AndroidImportance} from '@notifee/react-native/src/types/NotificationAndroid';\nimport {MulticastMessage} from 'firebase-admin/lib/messaging/messaging-api';\nimport admin from '../src/firebase-admin';\n\n/**\n * @link https://notifee.app/react-native/reference/notification\n */\nconst notifeeOptions: Notification = {\n  title: 'Title',\n  subtitle: 'Subtitle',\n  body: 'Main body content of the notification',\n  android: {\n    channelId: 'default',\n    importance: AndroidImportance.HIGH,\n    lightUpScreen: true,\n    pressAction: {\n      id: 'default',\n    },\n    sound: 'default',\n  },\n  ios: {\n    sound: 'default',\n    // Adding `foregroundPresentationOptions` controls how to\n    // behave when app is UP AND RUNNING, not terminated,\n    // AND not in background!\n    foregroundPresentationOptions: {\n      badge: true,\n      banner: true,\n      list: true,\n      sound: true,\n    },\n  },\n};\n\n\n/** \n * @description Firebase Message\n * @link https://firebase.google.com/docs/reference/admin/node/firebase-admin.messaging.basemessage.md#basemessage_interface\n */\nconst message: MulticastMessage = {\n  // ✅ We can continue using local/data-only notification for Android\n  // 👍 while triggering iOS remote notifications from `apns`\n  data: {notifee_options: JSON.stringify(notifeeOptions)},\n  tokens: [],\n  android: {\n    priority: 'high', // Needed to trigger data-only notifications\n  },\n  apns: {\n    payload: {\n      notifee_options: notifeeOptions,\n      aps: {\n        alert: {\n          // 🚧 This is needed to trigger an alert/remote notification only for iOS\n          // 👍 but Android will continue using data-only notifications\n          title: 'ANY_DUMMY_STRING',\n        },\n        mutableContent: true,\n      },\n    },\n  },\n};\n\ntry {\n  admin.messaging().sendEachForMulticast(message)\n  res.status(200).end();\n} catch (e) {\n  res.status(400).end();\n}\n```\n\n## 🤔 What it does?\nThis plugin handles moving the necessary NotifeeNSE files into their respective iOS directories.\n\n## Steps\n\n1. Updates entitlements\n2. Sets the app group to `group.\u003cidentifier\u003e` if applicable\n3. Adds the extension plist\n4. Adds the view controller\n5. Adds the NotifeeCore pod in Podfile\n6. Adds the sounds (if any) in the iOS project\n7. Updates the xcode project's build phases\n\n## 🪲 Debugging\n- Notifee issues: https://github.com/invertase/notifee/pull/1118\n\n\n## 📃 License\n\n\u003e 📃 This project is released under the [MIT License](LICENSE). \\\n\u003e 💻 By contributing, you agree that your contributions will be licensed under its MIT License.\n\n\n## 👏 Credits\n\nAdapted from:\n\n- https://github.com/OneSignal/onesignal-expo-plugin/blob/main/onesignal/withOneSignalIos.ts\n- https://github.com/bluesky-social/social-app/tree/main/plugins/notificationsExtension\n- https://github.com/evennit/notifee-expo-plugin\n\n- https://github.com/andrew-levy/react-native-safari-extension\n- https://github.com/timedtext/expo-config-plugin-ios-share-extension/blob/master/src/withShareExtensionXcodeTarget.ts\n\n\n## 🏆 Sponsors\n\n|                           |    \n|---------------------------|\n| [![jetbrains100][33]][28] |\n\n[7]: https://img.shields.io/badge/platforms-iOS-brightgreen.svg?style=flat-square\u0026colorB=191A17\n[9]: https://img.shields.io/github/license/LunatiqueCoder/luna\n[10]: https://github.com/LunatiqueCoder/expo-notifee-plugin/blob/master/LICENSE\n[13]: https://img.shields.io/npm/v/expo-notifee-plugin\n[14]: https://www.npmjs.com/package/expo-notifee-plugin\n[28]: https://www.jetbrains.com/\n[33]: https://user-images.githubusercontent.com/55203625/213786907-b95dfb4b-08bf-4449-a055-72edf401da23.png\n[34]: https://img.shields.io/badge/-Expo-282C34?style=flat-square\u0026logo=expo\u0026logoColor=#D04A37\n[35]: https://expo.dev/\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunatiquecoder%2Fexpo-notifee-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flunatiquecoder%2Fexpo-notifee-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flunatiquecoder%2Fexpo-notifee-plugin/lists"}