Provides some Apple Wallet's functionality, like adding passes, removing passes and checking passises for existing.
yarn add react-native-wallet-manager
or
npm install react-native-wallet-manager
Add Wallet module to capabilities in Xcode.
Don't forget to run pod install
!
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);
}
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.
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
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT