Use this library to generate passes, coupons, event tickets, store cards and generic passes:
Fill in all mandatory fields in order to generate your pass
Fill the passType (check the documentation on the field to understand which are the allowed values)
Download your global Apple certificate from here and add the .cer file to the certificates structure
1º Import the certificates to the resources or save it to a DB table. If you import it to the resources put it inside a folder and deploy it to the target directory
2º Import the icons/logos/thumbnails to the resources or save it to a DB table. If you import it to the resources put it inside a folder and deploy it to the target directory
Follow these instructions to generate your own pass certificate and add both the .p12 file and the password to the certificate structure
Fill any extra data you find relevant and add your fields to the Fields list
Call the GeneratePass action
Done!
All fields are documented and you can read additional documentation on the fields and the generated .pkpass package here.
There are specific rules and renderings for each pass type. To understand how the fields will be rendered according to your passType, read the documentation here.
To use this extension you should have the framework 4.7.2 installed otherwise will return an error in the compilation stage.
You will need an apple developer account to use this library