Skip to content

Provides some Apple Wallet functionality, like adding passes, removing passes and checking passises for existing.

License

Notifications You must be signed in to change notification settings

ferencik-f/react-native-wallet-manager

 
 

Repository files navigation

react-native-wallet-manager

Provides some Apple Wallet's functionality, like adding passes, removing passes and checking passises for existing.

npm version npm MIT
Platform - Android Platform - iOS

💜FOLLOW FOR RECENT NEWS💜

Installation

yarn add react-native-wallet-manager

or

npm install react-native-wallet-manager

iOS installation

Add Wallet module to capabilities in Xcode.

Don't forget to run pod install!

Usage

Adding pass to wallet by url

import WalletManager from 'react-native-wallet-manager';

// ...

try {
  const result = await WalletManager.addPassFromUrl(
    'https://github.com/dev-family/react-native-wallet-manager/blob/main/example/resources/test.pkpass?raw=true'
  );
  console.log(result);
  // true
} catch (e) {
  console.log(e);
}

Checking for pass exists (iOS only)

try {
  const result = await WalletManager.hasPass(
    'pass.family.dev.stage.beerpoint-master',
    'serial-xxx'
  );
  console.log(result);
} catch (e) {
  console.log(e);
}

First argument is pass identifier. You can pass second argument (optional) to specify pass serial number.

Removing pass (iOS only)

try {
  const result = await WalletManager.removePass(
    'pass.family.dev.stage.beerpoint-master',
    'serial-xxx'
  );
  console.log(result);
} catch (e) {
  console.log(e);
}

First argument is pass identifier. You can pass second argument (optional) to specify pass serial number.

Project inspired by react-native-wallet

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

About

Provides some Apple Wallet functionality, like adding passes, removing passes and checking passises for existing.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 35.7%
  • Java 33.4%
  • TypeScript 19.2%
  • JavaScript 6.0%
  • Ruby 5.0%
  • C 0.4%
  • Swift 0.3%