1
votes

enter image description here

enter image description here

you can see the two pic, at the top_right of first pic is "add"

and at the top_right of second pic is "update". i can do the effect as first pic.but i don't know how to do the second effect, how to use "update " instead of the "add".

1
What do you mean by "do the effect"? The option for update comes when a pass with the same serial number and deviceTypeIdentifier has already been installed and there are difference in the passes content. Is that what you mean? - Tomas McGuinness
@thomasmcguinness - I think you meant to say passTypeIdentifier not deviceTypeIdentifier - PassKit

1 Answers

1
votes

The add or update is controlled by the passTypeIdentifier and serialNumber in the pass.json.

If a user's passbook does not contain a pass of passTypeIdentifier pass.com.example with serialNumber 1234 they will be prompted to 'Add' the pass.

If a user's passbook already contains a pass of passTypeIdentifier pass.com.example with serialNumber 1234 and the content of the new pass is different to the pass they have installed, they will be prompted to 'Update' the pass.

If the pass is already installed but the data has not changed then the right button will be disabled with a message ('Added').

To see an example with a live pass, you can try downloading this pass. You will first be prompted to 'Add' the pass to your Passbook.

enter image description here

On the back of the pass is a link you can use to update the content.

enter image description here

If you click that, and change the content and select the 'Download' option, you will be presented with the 'Update' option.

enter image description hereenter image description here

If you click again but this time do not change any values and select 'Download' then you get the disabled 'Added' button.

enter image description here

Disclaimer: I am the co-founder of PassKit, the service that created this pass.