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 🙏

© 2024 – Pkg Stats / Ryan Hefner

expo-notification-service-extension-plugin

v1.0.1

Published

Expo plugin that expects a notification service extension file as an input and copies it to XCode binaries

Downloads

425

Readme

The Expo Notification Service Extension plugin allows you to add a Notification Service Extension file while staying in the managed workflow.

Overview

This plugin is an Expo Config Plugin. It extends the Expo config to allow customizing the prebuild phase of managed workflow builds (no need to eject to a bare workflow).

Supported environments:


Install

npx expo install expo-notification-service-extension-plugin

# npm
npm install expo-notification-service-extension-plugin

# yarn
yarn add expo-notification-service-extension-plugin

Configuration in app.json / app.config.js

Plugin

Add the plugin to the front of the plugin array. Configure any desired plugin props:

app.json

{
  "plugins": [
    [
      "expo-notification-service-extension-plugin",
      {
        "mode": "development",
        "iosNSEFilePath": "./assets/NotificationService.m"
      }
    ]
  ]
}

or

app.config.js

export default {
  ...
  plugins: [
    [
      "expo-notification-service-extension-plugin",
      {
        mode: "development", 
        iosNSEFilePath: "./assets/NotificationService.m"
      }
    ]
  ]
};

Plugin Prop

You can pass props to the plugin config object to configure:

| Plugin Prop | | | |--------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | mode | required | Used to configure APNs environment entitlement. "development" or "production" | | iosNSEFilePath | required | The local path to a custom Notification Service Extension (NSE), written in Objective-C. The NSE will typically start as a copy of the default NSE, then altered to support any custom logic required. e.g: "./assets/NotificationService.m". | | devTeam | optional | Used to configure Apple Team ID. You can find your Apple Team ID by running expo credentials:manager e.g: "91SW8A37CR" | | iPhoneDeploymentTarget | optional | Target IPHONEOS_DEPLOYMENT_TARGET value to be used when adding the iOS NSE. A deployment target is nothing more than the minimum version of the operating system the application can run on. This value should match the value in your Podfile e.g: "12.0". |

Prebuild (optional)

Prebuilding in Expo will result in the generation of the native runtime code for the project (and ios and android directories being built). By prebuilding, we automatically link and configure the native modules that have implemented CocoaPods, autolinking, and other config plugins. You can think of prebuild like a native code bundler.

When you run expo prebuild we enter into a custom managed workflow which provides most of the benefits of bare workflows and managed workflows at the same time.

Why should I prebuild?

It may make sense to prebuild locally to inspect config plugin changes and help in debugging issues.

Run

npx expo prebuild
# nukes changes and rebuilds
npx expo prebuild --clean

EAS Note: if you choose to stay in a fully managed workflow by not prebuilding, EAS will still run npx expo prebuild at build time. You can also prebuild locally but remain in a fully managed workflow by adding the android and ios directories to your .gitignore.

Run

The following commands will prebuild and run your application. Note that for iOS, push notifications will not work in the Simulator.

# Build and run your native iOS project
npx expo run:ios

# Build and run your native Android project
npx expo run:android

Publishing new version

npm publish --access public 

🤝 Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

This project is MIT licensed.