Closed prashant03Dev closed 7 months ago
Said that attaching proprietary code like this.walletService.createPass
is not very helpful to me to help you, I want to ask you two things:
1) Why are you uploading your pass to S3? 2) Do you already have you pass added to Apple Wallet and you want to download the same pass with updated informations?
@alexandercerutti
As we are uploading pass to s3,so in future we will update it via sync.
Suggest me if i am wrong,and let me know the ways to sync the pass in mobile device from backend
@prashant03Dev Update doesn’t work like that.
You need to follow Apple Web Service specifications and integrate the right endpoint and serve the pass as the update pass endpoint is called by Apple Wallet or by sending first a notification via APNS.
Either way, you need to generate a new pass as for each change you need to generate a new manifest and signature.
Therefore, saving a pass on S3 to update it is useless, as you will still need to create it again.
If you are willing to integrate Apple Web Services, I’ve created two packages, one of which is a plugin for Fastify, which will help you to setup only the business logic.
Hope this helps.
@alexandercerutti can you share the package name,I'm willingly to do that
@alexandercerutti Just one thing i was thinking about,
After generating a pass from server side,without storing it to s3,Do backend will send the buffer to the app and then they convert it to file and then they show. Is it?
@alexandercerutti
Q&A
-Do we send the buffer to client side. -If we implement APNS and generate notification from server side,will it be a silent notification or does it notifies to the user on their device.
-Will user tapping on notification redirects to apple wallet app and then he will be shown "do you want to update the pass"?
@alexandercerutti this are my questions in my mind,before implementing the APNS service at backend
After generating a pass from server side,without storing it to s3,Do backend will send the buffer to the app and then they convert it to file and then they show. Is it?
Yes! That's also why saving to s3 is useless. Passes are just a way to represent data. Data that you already have.
If we implement APNS and generate notification from server side,will it be a silent notification or does it notifies to the user on their device.
I don't have very much experience with APNS and Apple Wallet, so I don't know. I think that's a non-silent notification, as the updated information should have priority in user's mind IMHO.
Imagine a boarding pass that owns boarding gate information. Boarding gate changes but the user didn't check the "time table" yet. Receiving such information could be critical.
Will user tapping on notification redirects to apple wallet app and then he will be shown "do you want to update the pass"?
No. When I received passes updates, I just receive the notification and Apple Wallet opens the pass and highlights what changed. I think the download just happens in background, before sending the notification. I might be wrong tho.
@alexandercerutti So first time when user clicks on add to wallet,we send the buffer and then they will show it on their wallet.
Then after that if they again hits the add to wallet,we will idenitfy that the user has already passes or not for the specific one,
Is it @alexandercerutti
So first time when user clicks on add to wallet,we send the buffer and then they will show it on their wallet.
Exactly. You just need to pipe the buffer (or the stream) to the Node HTTP Response.
Then after that if they again hits the add to wallet,we will idenitfy that the user has already passes or not for the specific one,
"Hitting" is ambiguous. User can request a manual update of the pass, but you cannot know when it sees it.
Of couse, when you make the user to download your pass, Apple Wallet should already discard it if the combination of Serial Number, Pass Type Identifier and Team Identifier is the same.
Different is the case in which user requests the update or you send an APNS notification. In that case the serial number is the same and wallet will update it I think.
@alexandercerutti Got it,Thanks
Can we close this?
Yup!
Description
Expected behavior
-As while creating file from buffer part,we are viewing the latest changes made to card,and can be reflected the same to the S3 url that we are generating.
Issue:
As I'cant view the latest changes on wallet pass.
Source Code:
@alexandercerutti Can you help me out