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-safari-web-extension

v0.2.1

Published

Expo config plugin for creating Safari Web Extension targets with automatic Xcode project configuration and file management

Readme

Expo Safari Web Extension

An Expo plugin that adds Safari Web Extension support to your iOS app.

Installation

npm install expo-safari-web-extension

Configuration

Add the plugin to your app.json or app.config.js:

{
  "expo": {
    "plugins": [
      [
        "expo-safari-web-extension",
        {
          "extensionName": "MyExtension",
          "extensionSourcePath": "./safari-extension",
          "extensionBundleIdentifier": "com.yourapp.extension",
          "iosDeploymentTarget": "16.0",
          "extensionEntitlements": {
            "com.apple.security.app-sandbox": true,
            "com.apple.security.files.user-selected.read-only": true
          }
        }
      ]
    ]
  }
}

Required File Structure

Your Safari extension folder must follow this structure:

safari-extension/
├── SafariWebExtensionHandler.swift    # Swift bridge code
├── Info.plist                         # Extension metadata  
├── YourExtension.entitlements         # Sandbox permissions
└── Resources/                         # Web extension files
    ├── manifest.json                  # Extension manifest
    ├── popup.html                     # Extension popup UI
    ├── popup.js                       # Popup logic
    ├── background.js                  # Background script
    ├── content.js                     # Content script
    └── images/                        # Extension icons
        ├── icon-16.png
        ├── icon-32.png  
        ├── icon-48.png
        └── icon-128.png

This structure follows Apple's Safari Web Extensions guidelines and Web Extensions standards.

Options

| Property | Type | Required | Description | |----------|------|----------|-------------| | extensionName | string | ✅ | Name of your Safari extension | | extensionSourcePath | string | ✅ | Path to extension source files | | extensionBundleIdentifier | string | ❌ | Bundle ID for extension (defaults to {appId}.{extensionName}) | | iosDeploymentTarget | string | ❌ | iOS version target (default: "16.0") | | extensionEntitlements | object | ❌ | Extension sandbox permissions |

Supported File Types

The plugin automatically handles file type detection for Xcode. See the complete list of supported file types including:

  • Swift source files (.swift)
  • Web files (.html, .js, .css, .json)
  • Images (.png, .jpg, .svg)
  • Data models (.xcdatamodeld, .mlmodel)
  • Asset catalogs (.xcassets)
  • And 70+ more file types

Requirements

  • iOS 16.0+
  • Xcode 15.0+
  • Apple Developer Account (for device testing)

Examples

See the example app for a complete implementation.

To test different extension types, change extensionSourcePath in example/app.json:

  • Basic: "./safari-extension"
  • Media: "./safari-extension-media"
  • Password: "./safari-extension-password"
  • Translator: "./safari-extension-translator"
  • AdBlocker: "./safari-extension-adblocker"

Testing

  1. Build your app with Expo prebuild
  2. Open the generated Xcode project
  3. Configure code signing for both app and extension targets
  4. Run on device or simulator
  5. Enable extension in iOS Settings → Safari → Extensions

For detailed testing instructions, see TESTING.md.

Troubleshooting

Extension not showing after build? You need:

  • Code signing configured for BOTH app and extension targets in Xcode
  • Apple Developer Account
  • Enable extension in iOS Settings → Safari → Extensions → Your App

License

MIT