Hi team,
My use case is to generate event tickets (.pkpass) and open them in Google and Apple wallets.
I'm using the PassSharp component to generate the tickets. Generating the passes is successful (no errors), and I'm able to open them in Google wallet.
I'm then using the Open In Wallet plugin to try to open the tickets in Apple Wallet. Since this requires a URL, I use FilePlugin's SaveFile action to save the file in the device, then the GetFileUrlFromUri to get a blob URL to use in the AddPkPassToIOSWallet.
All the actions run successfully, without any errors, but nothing happens in the device. The pass is not opened or added to the wallet.
Also, when trying to open the .pkpass file downloaded, none of the apps suggested are the Apple Wallet.
Any suggestions to fix this issue?
Thank you
Hi Luis,
We have managed to solve the issue we were having on adding the PKPass to the Apple Wallet. Apparently, we had issues both with the PKPass generated and the OpenInWallet plugin, namely:
On PKPass generation:
On OpenInWallet plugin:
We were using the action AddPkPassToIOSWallet , which requires a URL execute de downloadPass() JS function. However, our use case was one where we had a temporary file on the device, so we couldn’t use either the URI nor the blob URL associated with the file storage.
From what we saw on your GitHub repository documentation (https://github.com/luisvoliveira/OS-cordova-plugin-passbook/blob/master/doc/index.md ), the downloadPass() was not the function we should be using, but instead, we should use the other one have available there but not yet on the OutSystems plugin - the addPass() function. By creating an alternative action on OpenInWallet_Plugin using addPass() JS function, which receives a local file path as input instead of an URL, we were able to successfully add our PKPass to the Apple Wallet.
Based on our use case, we believe it would be a great upgrade to your plugin to have this addPass() also available on a Client Action.
Thanks for the help and the plugin.
Best regards,
Ines
Hi, the problem could be with the PKPass that isnt generated correctly. if you download the pkpass and try to open in the iphone, can you open it?
Regards,
Luis
If I try to open the file that has been saved in the iphone, all I can see is as the image below:
I've also tried opening the file downloaded in my PC and compare it to an example file from Apple, and the structure looks the same. This is what my file looks like:
Here's how I'm generating the pass, using the GeneratePass action from the PassSharp forge component:
All the other attributes not shown are left empty.