# How to create APNs certificate?

Overview 
---------

The Apple Push Notification service (APNs) is a cloud-based gateway created by Apple Inc. to facilitate communication between third-party services (like Hexnode UEM) and Apple devices.

### Why it is Required 

Hexnode UEM requires an APNs certificate to authorize and send commands to iOS, iPadOS, and macOS devices. The communication flow is as follows:

- Hexnode UEM Server sends a notification to the APNs Server.
- APNs Server forwards the communication to the target Apple Device.

Configuration Workflow (3 Steps) 
---------------------------------

#### Step 1: Create a Certificate Signing Request (CSR) 

1. Log in to the Hexnode UEM Portal.
2. Navigate to **Admin** > **APNs**.
3. Select **Configure APNs Certificate**.
4. Click **Generate CSR** to download the self-signed certificate provided by Hexnode.

#### Step 2: Upload the CSR to the Apple Server 

1. Visit the [Apple Push Certificates Portal](https://idmsa.apple.com/IDMSWebAuth/signin?appIdKey=3fbfc9ad8dfedeb78be1d37f6458e72adc3160d1ad5b323a9e5c5eb2f8e7e3e2&rv=2).
2. Log in with a corporate or personal Apple ID.
3. Click **Create a Certificate**.
4. Upload the Self-Signed certificate (CSR) downloaded from Hexnode in Step 1.
5. Download the newly generated APNs certificate (.pem file) from Apple.

#### Step 3: Upload the APNs Certificate to Hexnode 

1. Return to the Hexnode UEM Portal.
2. Upload the APNs certificate file received from Apple.
3. Verification: Once uploaded, certificate details will be visible under **Admin** > **APNs**.

[![Configure APNs certificate](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2019/12/Configure_APNs-certificate.png)](https://cdn.hexnode.com/mobile-device-management/help/wp-content/uploads/2019/12/Configure_APNs-certificate.png)
Lifecycle Management 
---------------------

#### Renewing the Certificate 

- **Validity**: 1 year (365 days) from the date of creation.
- **Process**: 
    1. Go to **Admin** > **APNs**.
    2. Click **[Renew Certificate](https://www.hexnode.com/mobile-device-management/help/renew-apns-certificate/)**.
    3. Follow the same three-step process used during initial configuration.

#### Removing the Certificate 

- Prerequisite: All Apple devices must be disenrolled before the certificate can be deleted.
- Procedure: 
    - Navigate to **Admin** > **APNs**.
    - **Click the link**: “No longer managing Apple devices!” (located in the top right corner).
    - If no devices are active, click **Delete** to confirm.

![remove apns certificate](https://www.hexnode.com/mobile-device-management/help/wp-content/uploads/2018/08/remove-apns-certificate-1-1024x547.png)