# My APNS push certificate expired, what should I do?

Batch servers need a push certificate to communicate with Apple Push Notification Services (APNs). There are two kinds of certificates you can use with Batch: a .p8 file or a .p12 certificate, which expires after 12 months.

If you stop receiving push notifications and an error message appears in the campaigns list, your .p12 certificate probably expired.

Here is how to generate a .p8 file for your app in two easy steps:

## 1. Download the .p8 file <a href="#id-1-download-the-p8-file" id="id-1-download-the-p8-file"></a>

First, generate and download a new .p8 file:

* Go to the [Apple Developer Member Center](https://developer.apple.com/account/ios/profile/profileList.action)
* Go to the *"Keys"* menu
* Add a new key.

<figure><img src="https://38998153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8wF0y1T2vLnm3yR2MW%2Fuploads%2FsKiJ2riIR2EMiOHgZzVf%2FtroubleshootingTech_appleDevKey_200525.png?alt=media&#x26;token=c626cde3-4b4c-4a2e-9ced-cbfd1ee46f5e" alt=""><figcaption></figcaption></figure>

* Give a name to your key
* Tick the *"Apple Push Notifications Service"* box
* Download the .p8 file.

<figure><img src="https://38998153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8wF0y1T2vLnm3yR2MW%2Fuploads%2FI7t2A6LCut07mEogh0eB%2FtroubleshootingTech_p8NewKey.png?alt=media&#x26;token=35f66230-14b4-4fe8-93d4-1cf088dac25d" alt=""><figcaption></figcaption></figure>

## 2. Upload the .p8 file <a href="#id-2-upload-the-p8-file" id="id-2-upload-the-p8-file"></a>

On the Batch dashboard, go to **Settings → Channels → iOS**, and upload your .p8 file.

<figure><img src="https://38998153-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FCL8wF0y1T2vLnm3yR2MW%2Fuploads%2Fq7iTanpw18KZBykSWGcx%2FtroubleshootingTech_iOSSettings_200525.png?alt=media&#x26;token=e19d180e-5431-4f05-9fbb-302e8a357f9c" alt=""><figcaption></figcaption></figure>

You will need to paste two IDs to be able to use your new certificate:

* **App ID / Bundle ID**: Use the bundle ID you will find in Xcode. You can also use the app ID available from the Developer Console [here](https://developer.apple.com/account/ios/identifier/bundle).
* **Team ID**: The team ID is available from the Developer Console [here](https://developer.apple.com/account/#/membership/).

{% hint style="warning" %}
Make sure you use the correct IDs.\
After uploading the new certificate, we recommend sending a push to your device.
{% endhint %}
