TheWirv / react-native-wallet-passes

React Native module to handle Wallet passes on iOS and Android.
MIT License
10 stars 4 forks source link

Add multiple passes at the same time #9

Open labmorales opened 1 year ago

labmorales commented 1 year ago

Added a method to add multiple tickets at once.

Usage:

try {
    // Array of base64 encoded passes
    const passes = ['UEsDBBQAAAAIALyjYlXC3w/c5Q....', 'UEsDBBQAAAAIALyjYlXC3w/c5..']
    await WalletPasses.addPasses(passes);
} catch (e) {
    console.error('Unable to open the wallet pass.');
}
cicatrizdev commented 1 year ago

+1

cicatrizdev commented 1 year ago

@TheWirv can we have this PR merged?

TheWirv commented 1 year ago

Sure, when you find a way to do it on Android too.

labmorales commented 1 year ago

@TheWirv how do you suggest we do that? Since Android does not have native capabilities to open PKPass. Can we save multiple passes into a folder and try to open that folder? That way the user would select the files he/she wants to add.

TheWirv commented 1 year ago

@TheWirv how do you suggest we do that? Since Android does not have native capabilities to open PKPass. Can we save multiple passes into a folder and try to open that folder? That way the user would select the files he/she wants to add.

I have no suggestions at all, sorry. You have to figure something out on your own. What I will say, though: I think of this package as a multi-platform one, that supports both Android and iOS with all of its features.