0.1.4 • Published 3 months ago

@giulio987/expo-wallet v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

React Native (Expo) Wallet Module

This is a React Native module designed to simplify the integration of Wallet functionality for both iOS and Android using Expo. It allows you to add, and in the future, interact with all the features available on the iOS Wallet and Google Pay apps, within your React Native application.

Installation

To get started, follow this step: Install the module using npm or yarn:

npm install @giulio987/expo-wallet

or

yarn add @giulio987/expo-wallet

Usage

iOS: The pass must be a base64 encoded string of the .pkpass file

Android: the pass must be a token - here's the codelab

Adding a Card to Wallet

To add a card to the Wallet app, use the addPass method

 const addToWallet = async () => {
    try {
      const res = await ExpoWallet.addPass(Platform.OS === "ios" ? pass : token);
    } catch (error) {
    }
  };

Check if the Wallet is available

To verify if the Wallet is available, use the isAvailable method

 const isAvailable = async () => {
    const res = await ExpoWallet.isAvailable();
    if (res) {
      alert('Available');
    } else {
      alert('Not available');
    }
  };

Soon available:

  • Checking if a Card is in Wallet

Contributing

Feel free to contribute to this project! If you have any feature requests, bug reports, or other contributions, please open an issue or submit a pull request.

License

This module is released under the GPL-3.0 License.

0.1.4

3 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

8 months ago

0.1.0

8 months ago