.p8
is a key
The .p8
is an authentication token signing key, or simply, key. Your server can use this to authenticate with APNs. You can use this to create a JWT token (A few objects encoded and signed) and send this to APNs to authenticate. Specifically you use the .p8
to sign the JWT payload/ token, and append this signature to the JWT, and then encrypt it (Signed, then Encrypted). More information available in Communicate with APNs using authentication tokens and Establishing a Token-Based Connection to APNs. The way you would create the token is documented in
Communicating with APNs. For example, the JWT must be encrypted, and it must be less than 1 hour old. It provides access to all applications, so you must use the apns-topic
request header to specify the application.
.p12
is a certificate
The .p12
is a certificate. If your system has this certificate installed, it can use TLS and identify as you, so there's no further authentication needed. More information available in Communicate with APNs using a TLS certificate. It provides access to one app.
A good resource is
Communicating with APNs.
Does that mean those .p8 files are keys used to create tokens,
Yes
and those .p12 files are used as certificates?
Yes