Configuring an iOS application to send push notifications
The Universal Push Notification Client SSL Certificate is required for sending push notifications to iOS apps. To get this certificate, you need to specify your app's identifier (App ID). You can create one in the Apple Developer Console.
If you already have an App ID, request a certificate.
Step 1. Request a certificate
- Open Keychain Access on your computer.
- Go toand enter the required information. Pay attention to the password. You will need it when setting up the certificate in the AppMetrica interface.
- Under Request is, enable the Saved to disk option and click Continue.
- Save the request file on your computer and click Done.
Step 2. Get a certificate
- In the Apple Developer Console, go to Certificates, Identifiers & Profiles.
- In the Certificates menu, select All and go to the Production section.
- Enable the Apple Push Notification service SSL (Sandbox & Production) option and click Continue.
- In the App ID drop-down list, select the app ID that needs a certificate, and click Continue. The selected App ID must match your bundle ID.
- Since the certificate request has already been sent, click Continue.
- Click Choose File. In the window that opens, select the certificate request file (for example, example.certSigningRequest) and click Choose, then Continue.
- Click Download to download the certificate. Then click Done.
- Double-click the file to install the certificate.
Step 3. Export a Private Key from the installed certificate
- Open Keychain Access on your computer and choose Certificates in the menu.
- In the list, select the certificate that you installed.
- Choose Save.in the menu. Then enter a name for the file to export and set the format to Personal Information Exchange (P12). Click
- In Password, set a password for the key and click OK. If you don't set a password, the certificate won't be accepted in the AppMetrica interface.
- To activate the export, enter the password for your computer. Then click Allow. The P12 file is saved on your computer.
Step 4. Use the Private Key in AppMetrica
- In the AppMetrica interface, go to the Applications section and select the app that you want to run push campaigns for.
- In the menu on the left, select Settings.
- Go to the Push notifications tab.
- Under iOS, click Choose file (next to Universal Push Notification Client SSL Certificate).
- In the window that opens, select the key file in P12 format and upload it.
- In Password, enter the password you set when saving the key (step 3).