I did some adequate amount of digging, so hopefully you don't have to.
1. Follow Push notifications for iOS till you reach the point where the PEM file is converted from the P12 file you exported from Keychain Access. You can try following the instruction to upload the PEM file. If the uploads fails for unexplained reasons, keep reading.
2. Use a text editor to open the PEM file. You can see two sections of strings, one is certificate, the other is private key.
3. Copy the certificate text to a separate empty text file (for convenience). Do make sure to also copy "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" markers. Then use the replace method of the text editor to convert all line breaks into "\n" exactly, so that it becomes a single line string. This is not mentioned in any PlayFab official documentation (please prove me wrong)
4. Repeat the process for the private key section. Keep the markers and convert all line breaks in the key text.
5. In an environment where you can call PlayFab API (be it Postman, a .NET Core console app, or just an Editor script in Unity), include the Admin API and call SetupPushNotification.
- Set the "Key" property of the request to the certificate string
- Set "Credential" property to the private key string.
- If the certificate is the newer "Apple Push Notification (Production & Sandbox)" one, set "Platform" property to APNS.
6. Run the API call and profit. Do keep an eye on the API response in case some other errors occur.