Reputation: 767
I created a pass statically by typing command line in order to create pass.pkpass. I also use web service in MAMP. How to generate a pass dynamically ? and where is pass.pkpass stored ?
Upvotes: 3
Views: 2272
Reputation: 12581
To generate the pass dynamically, you will need code that will:
pass.json
file containing the dynamic pass data and compute its SHA1 hashYou may also need code to:
serialNumber
and authenticationToken
As for where the .pkpass files go, this is entirely up to you. You can either store them or delete them once they have been served to the device. Since the code that you will need can recreate the .pkpass bundle, and since your web service will send a 304
response to a device that already has the latest version of the pass, there is little value in keeping these files on your server.
If you are using MAMP, then this PHP Library is a good place to start.
Upvotes: 3