react-native-wallet
ReactNative module for Apple Wallet Version 1.0.8
Installation
npm install --save react-native-wallet
react-native link react-native-wallet
Usage
// Import;
The following calls are implemented:
/** * Check if you can add passes. * @param callback A callback which will receive a boolean */Wallet; /** * Show the pass controller for the provided URL. * The resolving promise will contain a boolean saying if the pass was added or not. * @param passURL URL to pkpass file * @return Promise Passing a boolean */Wallet; /** * Show the pass controller for the provided filepath. * The resolving promise will contain a boolean saying if the pass was added or not. * @param filepath File path pkpass file * @return Promise Passing a boolean */Wallet;
Usage with File
- Download .pkpass using react-native-fetch-blob
- pass resulting file to showAddPassControllerFromFile
const sharePkPass = try const payload = ; // custom payload const result = await RNFetchBlob ; const resultShare = await ; catch err console }