Programmatically create pass for passkit on device?

I am trying to find a way to generate a pass for passkit on the device myself after it received the information in order to pass the pass through the network.

Does anyone know if this can be done / how to do it?

+4
source share
2 answers

Refer to: https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/PassKit_PG/YourFirst.html#//apple_ref/doc/uid/TP40012195-CH2-SW1

Basically: it’s not easy (if at all), you should be able to sign your pass using signpass , a command-line utility to make it readable by devices. This will cause a lot of trouble and problems, since you cannot start another process in iOS, and it may not be possible to convert the signpass code to run on the device.

What I would like to offer is to sign my pass on the server / wherever the data comes from, and send both the information and the generated .pkpass . Here's how it was designed and how to use it. Read the documents for more information, they are very clear.

+5
source

In fact, Apple has reported security issues when signing badges on iOS. This is because certificates must be packaged with the application. And you do not want to provide certificates to such users.

Like WDUK, use a simple server to sign and distribute a proxy server from which your application can request a pass. This is also very useful if you want to update gaps added to devices.

I'm sure you can find a server implementation that fits your needs on GitHub .

+1
source

Source: https://habr.com/ru/post/1443501/


All Articles