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-plugin-ios-static-libraries

v1.1.0

Published

Expo Config Plugin to set specific iOS libraries to use static build type

Downloads

8,020

Readme

Expo Plugin iOS Static Libraries

An Expo Config Plugin that allows you to set specific iOS libraries to use static build type. This helps resolve issues with dynamic library dependencies in your iOS builds.

Compatibility

| Expo SDK | Supported | |----------|-----------| | 54 | Yes | | 53 | Yes | | 52 | Yes | | < 52 | No |

Installation

npm install expo-plugin-ios-static-libraries
# or
yarn add expo-plugin-ios-static-libraries
# or
bun add expo-plugin-ios-static-libraries

Usage

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

Basic Usage (String Format)

For simple cases where modular headers are not needed:

{
  "name": "my-app",
  "expo": {
    "plugins": [
      [
        "expo-plugin-ios-static-libraries",
        {
          "libraries": ["LibraryName", "AnotherLibraryName"]
        }
      ]
    ]
  }
}

Swift Pods with Modular Headers

For Swift-based pods (like Firebase), you may need to enable modular headers to avoid '*-Swift.h' file not found errors:

{
  "name": "my-app",
  "expo": {
    "plugins": [
      [
        "expo-plugin-ios-static-libraries",
        {
          "libraries": [
            "BleManager",
            { "name": "Firebase", "modularHeaders": true },
            { "name": "FirebaseAuth", "modularHeaders": true },
            { "name": "GTMSessionFetcher", "modularHeaders": true }
          ]
        }
      ]
    ]
  }
}

When to Use Modular Headers

Enable modularHeaders: true when you see errors like:

  • 'FirebaseAuth/FirebaseAuth-Swift.h' file not found
  • Include of non-modular header inside framework module
  • Swift bridging header errors

Not all pods need modular headers. Only enable it for pods that:

  1. Are written in Swift, or
  2. Have Swift dependencies, or
  3. Show module-related build errors

Example

Here's an example of how to set React-Native-BLE-PLX, react-native-permissions, and @op-engineering/op-sqlite to use static libraries:

{
  "name": "my-app",
  "expo": {
    "plugins": [
      [
        "expo-plugin-ios-static-libraries",
        {
          "libraries": ["BleManager", "RNPermissions", "op-sqlite"]
        }
      ]
    ]
  }
}

How it Works

This plugin uses Expo Config Plugins to modify the Podfile during the build process. It adds a pre_install hook that:

  1. Sets static library build type for specified libraries
  2. Enables modular headers for libraries that need them (using CocoaPods' set_use_modular_headers_for_pod API)

The generated code looks like:

pre_install do |installer|
  # Enable modular headers for Swift compatibility
  ['Firebase', 'FirebaseAuth'].each do |lib_name|
    installer.podfile.target_definitions.each do |name, target_def|
      target_def.set_use_modular_headers_for_pod(lib_name, true)
    end
  end

  # Set static library build type
  installer.pod_targets.each do |pod|
    if pod.name.eql?('BleManager') || pod.name.eql?('Firebase') || pod.name.eql?('FirebaseAuth')
      def pod.build_type
        Pod::BuildType.static_library
      end
    end
  end
end

This forces CocoaPods to build the specified libraries as static libraries instead of dynamic frameworks, which can help resolve dependency issues in some cases.

Troubleshooting

Swift Header Not Found Errors

If you see errors like 'SomePod/SomePod-Swift.h' file not found, try enabling modular headers for that pod:

{ "name": "SomePod", "modularHeaders": true }

gRPC Module Map Errors

If enabling modular headers causes gRPC-related errors, ensure you're only enabling modular headers for the specific pods that need it, not globally.

License

MIT