npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-nse-plugin

v2.1.0

Published

An Expo config plugin for iOS that allows you to easily add a Notification Service Extension to an Expo-managed React Native project.

Readme

Expo NSE Plugin

An Expo config plugin for iOS that allows you to easily add a Notification Service Extension to your project.

A lightweight, unrestricted alternative for creating NSE with Expo under a standard MIT license. No vendor lock-in, no usage limitations - just clean code you can use anywhere.

Scope

  • creation of the Notification Service Extension target inside your project
  • configurable Objective-C implementation and header files of the Notification Service Extension
  • configurable App Group identifier, bridging your application with the Notification Service Extension
  • automation of the Xcode pbxproj file modifications - build settings, groups, build phases and others
  • an option to provide your own code to be injected into App Delegate's imports fragment and into its didRegisterForRemoteNotificationsWithDeviceToken function signature

[!IMPORTANT] This config plugin does not serve as any kind of replacement of the Expo Notifications module. Instead, it builds on top of it. While Expo NSE Plugin exposes some configuration options that may overalp with the aforementioned module, ideally, you should use Expo Notifications to configure your app's notifications (both for iOS and Android) and then in case you need the NSE enhancement, add this config plugin to the mixture.

Provisioning profiles

The developer team will be copied from your app.json into the Notification Service Extension, so if your Xcode project "Automatically manage[s] signing" this may be sufficient to sign it.
Otherwise, this plugin does nothing else related to the signing process and does not automate the process of choosing the provisioning profile for the NSE target. For this purpose it's probably best if you use Expo Application Services and its multitarget configuration.

Installation and usage

Add the package to your npm dependencies

npx expo install expo-nse-plugin

Config plugin setup

To setup, just add the config plugin to the plugins array of your app.json or app.config.js as shown below, then rebuild the app.

Simple:

{
  "expo": {
    ...
    "plugins": [
      ...,
      "expo-nse-plugin"
    ],
  }
}

Advanced:

{
  "expo": {
    ...
    "plugins": [
      ...,
      [
        "expo-nse-plugin",
        {
          "mode": "development",
          "appGroup": "group.com.github.pawicao.app",
          "intents": ["INSendMessageIntent"],
          "backgroundModes": {
            "remoteNotifications": true,
            "fetch": true
          },
          "appDelegate": {
            "remoteNotificationsDelegate": "[SomeOtherService setPushIdentifier:deviceToken];",
            "imports": "#import \"SomeOtherService.h\"" // or array of import lines
          },
          "nse": {
            "sourceFiles": ["./my_path/to_a_custom_nse_implementation_file", "./my_path/to_a_custom_nse_header_file", "./my_path/to_a_custom_swift_file"],
            "bundleName": "NotificationServiceExtension",
            "frameworks": ["Intents.framework"],
            "extraBuildSettings": {
              "OTHER_LDFLAGS": "$(inherited) -lstdc++"
            },
            "extraInfoPlist": {
              "com.github.pawicao.app.MyMetadataKey": "value"
            }
          }
        }
      ]
    ],
  }
}

API documentation

All the options of the plugin configurable from the app.json / app.config.js file are listed below:

| Property | Type | Required | Default | Description | |-------------------------------------------|---------------------------------|--------------|----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| | mode | "development" \| "production" | No | "development" | Determines the APNs environment. Use development for testing and production for App Store builds | | appGroup | string \| string[] | No | None | The App Group identifier or identifiers used to share data between the main app and the NSE. Format: group.your.bundle.id | | intents | string[] | No | None | Registers intents for your main app in NSUserActivityTypes, which can be required for SiriKit integration and Communication Notifications | | backgroundModes.remoteNotifications | boolean | No | true | Enables remote notifications background mode in your app's capabilities (if set to false, keeps as-is) | | backgroundModes.fetch | boolean | No | false | Enables background fetch capability in your app's capabilities (if set to false, keeps as-is) | | appDelegate.remoteNotificationsDelegate | string | No | None | Custom code to be injected into the didRegisterForRemoteNotificationsWithDeviceToken method of your AppDelegate | | appDelegate.imports | string \| string[] | No | None | Additional import statements to be added to your AppDelegate | | nse.sourceFiles | string \| string[] | No | Default Xcode's NSE content | Path to custom source files (.swift, .m, .h) for the Notification Service Extension. Automatically enables Swift build settings when Swift files are present. | | nse.bundleName | string | No | "NotificationServiceExtension" | The name of your Notification Service Extension target | | nse.frameworks | string[] | No | None | Additional iOS Frameworks to link with the Notification Service Extension (UserNotifications.framework always included) | | nse.extraBuildSettings | object | No | None | Additional string keys/values to add to the Notification Service Extension's build settings | | nse.extraInfoPlist | object | No | None | Additional string keys/values to add to the Notification Service Extension's Info.plist (not the main app's Info.plist) |

Contributing & testing

PRs and feedback are more than welcome! If you see a way of extending this plugin's configuration options or capabilities, do let me know!

This plugin has not been thoroughly tested over different range of Xcode versions, I simply created it for my own use case. Therefore there's a chance that it may fail in some specific configurations of your particular project and your environment. If this is the case, feel free to raise an issue and I'll try to do something about it!

Refer to expo-module-scripts documentation for information about useful commands while developing the plugin.

Flexible Source Files Support

Starting with v2.0.0 the plugin simplifies the source files configuration for your Notification Service Extension, allowing you to e.g. include swift files. When you provide source files via the sourceFiles option, the plugin will automatically:

  • Add the source files to the NSE target's Compile Sources phase
  • Enable Swift build settings (ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES: YES) when Swift files are detected
  • Set the Swift version to 5.0 when Swift files are present (if needed, this can be overwritten with setting SWIFT_VERSION via the extraBuildSettings property)

Breaking Change Notice

Version 2.0+ Breaking Change: The mFilePath and hFilePath options have been removed in favor of the unified sourceFiles option. If you were using the legacy options, update your configuration:

Before (v1.x):

{
  "nse": {
    "mFilePath": "./src/NotificationService.m",
    "hFilePath": "./src/NotificationService.h"
  }
}

After (v2.0+):

{
  "nse": {
    "sourceFiles": ["./src/NotificationService.m", "./src/NotificationService.h"]
  }
}