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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-nitro-wallet

v0.1.7

Published

A React Native package for interacting with Apple or Google Wallet

Readme

react-native-nitro-wallet

Image

⚠️ This package is under development, please report any issues!

A React Native Wallet integration package built with Nitro Modules. You can add a pass, detect the existence of a pass and remove a pass. Bulk add passes is coming soon 🚧. Currently Apple Wallet (iOS) only, but support for Google Wallet (Android) coming soon 👀

⚠️ Requirements

  • React Native v0.76.0 or higher
  • Node 18.0.0 or higher

🔧 Installation

yarn add react-native-nitro-wallet react-native-nitro-modules
cd ios && pod install

[!IMPORTANT] It is recommended to first read Getting Started with Apple Wallet to get familiar with the concepts of creating, distributing and updating passes for Apple Wallet

This package assumes you have already a generated pass, which is generally served to the app via a backend. passkit-generator is a solid resource for this.

⚙️ Set up

iOS

  • Follow the documentation on creating a Pass Type ID certificate
  • Open your project in xcode - open ${YourProjectName}.xcworkspace
  • Go to Target > Signing & Capabilities and click + Capability
  • Then filter by "Wallet" and click to add
  • This will generate a new Entitlements file: ${YourProjectName}/ios/${YourProject}/${YourProject}.entitlements. Which will add the following to it:
<key>com.apple.developer.pass-type-identifiers</key>
<array>
  <string>$(TeamIdentifierPrefix)*</string>
</array>
  • If you already have an entitlements file, then you don't need to follow the above, you can simply add the above code block to that file.
  • The wildcard (<string>$(TeamIdentifierPrefix)*</string>), is auto-generated when adding Wallet capabilities via xcode, but it can be flaky on newer versions of React Native. If you find this package is not working (adding, viewing, deleting passes etc), then try removing the wildcard and explicitly putting in your Pass Type ID like so: <string>$(TeamIdentifierPrefix)pass.com.example.myapp</string>
  • Once this is done, re-run:
cd ios && pod install

🚀 Usage

import { Wallet } from "react-native-nitro-wallet";

📘 API Reference

canAddPassesToAppleWallet(): Promise<boolean>

Checks if the current device can add passes to Apple Wallet (e.g. Wallet app installed, supported device)

try {
  const canAddPass = await Wallet.canAddPassesToAppleWallet();
  return canAddPass // true or false
} catch (error) {
  console.error("Can't add pass");
}

addPassToAppleWallet(base64String: string): Promise<boolean>

[!IMPORTANT] The parameter passed to addPassToAppleWallet must be base 64 encoded!

  • Adds a single pass to Apple Wallet
  • base64String: A base64-encoded .pkpass file
try {
  await Wallet.addPassToAppleWallet(base64PkPass);
} catch (error) {
  console.error("Failed to add pass to wallet");
}

viewPassInAppleWallet(cardIdentifier: string, serialNumber?: string): Promise<void>

Opens an existing pass in Apple Wallet

  • Use this if you want to let the user view the pass from inside your app
  • cardIdentifier: Your registered Pass Type ID
  • serialNumber: Optional - use if your system issues multiple passes under one ID
try {
  await Wallet.viewPassInAppleWallet('pass.com.example.myapp', '1234567890');
} catch (error) {
  console.error("Failed to view pass in wallet");
}

doesPassExistInAppleWallet(cardIdentifier: string, serialNumber?: string): Promise<boolean>

Checks if a pass matching the provided identifiers exists in the user’s Wallet

try {
  const exists = await Wallet.doesPassExistInAppleWallet('pass.com.example.myapp', '1234567890');
  return exists // true or false
} catch (error) {
  console.error("Failed to check if pass exists in wallet");
}

removePassFromAppleWallet(cardIdentifier: string, serialNumber?: string): Promise<void>

Removes a matching pass from the Wallet, if it exists

try {
  await Wallet.removePassFromAppleWallet('pass.com.example.myapp', '1234567890');
} catch (error) {
  console.error("Failed to remove pass from wallet");
}

Credits

Bootstrapped with create-nitro-module.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.