-1

How does pull to refresh work in passbook. What we should do to implement this functionality in the web service.

When we pull the pass down in the backfield what exactly happens, does it talk with the web service to get the updated pass? does it download whole .pkpass file? How does it work.

1 Answers1

0

If you read the Web Service documentation you would know that you have to implement at least the

  • 'Registering a Device to Receive Push Notifications for a Pass', and
  • 'Getting the latest version of a pass'

methods to allow the device to first register with your web service, and then to request the latest version of the pass when the pull to refresh action is triggered.

If you had read the Passbook Programming Guide you would know that each update requires a full .pkpass bundle.

To see exactly what calls the device makes to the web service and the responses it receives, if you have a developer account, enable additional Passbook Logging from your device's developer menu. Then hook your device up to Xcode and watch the console in the organiser as you pull down to refresh.

PassKit
  • 12,231
  • 5
  • 57
  • 75
  • Thanks for the reply , but I do not have any custom application for device registration.I have just downloaded .pkpass file and added it to passbook. Now my question is if something has changed in the back end how i will get that update without using any notification.The reason i am asking this question because there is option to pull down the pass and by doing so it shows the activity indicator, so what does it do here, does it talk to the web services which is provided in the webserviceURL key in the pass.json file ,if so how to implement this functionality in web services? Thanks In advance – user2652642 Aug 05 '13 at 11:43
  • Assuming that the pass has properly registered with the web service, it calls the 'Getting the latest version of a pass' method and if there is a new .pkpass bundle, it will download it. See updated answer for how you can see exactly what is going on. – PassKit Aug 05 '13 at 19:42