# Apple iOS

Integration with Apple Push Notification Service allows you to send push notifications through the Apple iOS platform. In order to integrate your mobile app with PushPushGo, implement one of our mobile SDKs in your application:

* iOS: <https://github.com/ppgco/ios-sdk>
* Flutter: <https://github.com/ppgco/flutter-sdk>

To complete integration, register App ID on Apple Developer account, create APNs certificate (.p12 file) and upload it in the Integration section. Start from getting your certificate.

Create Certificate Signing Request

To generate Safari certificate you need to create **Certificate Signing Request** first. For this purpose launch the Keychain Access app.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FbWRrvMORS6ZFlIQzUTlJ%2F1559292646-2019-05-291552.png?alt=media&#x26;token=47065ff7-f626-40e4-97e5-2760fa5927bc" alt=""><figcaption></figcaption></figure>

Click on Keychain Access > Certificate Assistant > **Request a Certificate From a Certificate Authority**.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FPsVqm9d9jbnjmCFqn4jA%2F1559292830-2019-05-291554.png?alt=media&#x26;token=557d01e3-b3e0-4cd4-9b7e-bd3c4debac3b" alt=""><figcaption></figcaption></figure>

The Assistant window will appear. Enter your e-mail address and name for your certificate. Then check Saved to disk option and click Continue.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FfgSRJEPUoEFK1wcavYRj%2F1559293082-2019-05-291556.png?alt=media&#x26;token=d289d943-a09b-447d-b07c-1b8089d38c21" alt=""><figcaption></figcaption></figure>

Save the Certificate Signing Request (CSR). **You will need it to generate a certificate**.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FalYOVv96AgpkUL3b5gUK%2F1559293626-2019-05-291558.png?alt=media&#x26;token=9b17445b-09c2-482c-8809-fde8999853e5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FFhnD36g15sb2rdG1boTg%2F1559293673-2019-05-291559-copy.png?alt=media&#x26;token=40eb1856-9c6a-4db6-a131-1cf3d6fec2bd" alt=""><figcaption></figcaption></figure>

Register an App ID

Log into your [Apple Account](https://developer.apple.com) and go to Identifiers section.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FrMW2M6YklUryQWbVbDI3%2Fapple%20navigation.png?alt=media&#x26;token=9d2e8602-51bb-49bb-927d-bd339a6888bf" alt=""><figcaption></figcaption></figure>

In Indentifiers click the add button (+) on the top left.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FkZmNTqsi00k9BNy8f0YU%2Fapple%20identifiers.png?alt=media&#x26;token=a656b923-d6aa-4089-8c82-794d25f23482" alt=""><figcaption></figcaption></figure>

Select App IDs from the list of options and click continue.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2Fpw0AUJd4ojU1mRj4OVMr%2Fapple%20create%20app%20id.png?alt=media&#x26;token=56910d23-8e9d-4979-babd-27f13f78dd26" alt=""><figcaption></figcaption></figure>

Select App type and click Continue.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2F9NdHSqEEr7b9Wf0zsgFg%2Fapple%20app%20id%20type.png?alt=media&#x26;token=6058c785-8c53-4766-a955-e62de4c08c72" alt=""><figcaption></figcaption></figure>

Enter a name or description for the App ID in the Description field. Select Explicit App ID and enter the app’s bundle ID in the Bundle ID field. The explicit App ID you enter here should match the bundle ID you entered in the target’s Summary panel in Xcode. Select the corresponding checkboxes to enable the app capabilities you want to use and click 'Continue'.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FDtaPDFJE4Niaamdj4n0u%2Fapple%20bundle%20id.png?alt=media&#x26;token=67729251-2374-4cfc-a408-9ea5251d38ec" alt=""><figcaption></figcaption></figure>

Review the registration information and click Register.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2F6iDv8wX5oeW3CENlCfG8%2Fapple%20bundle%20id%20confirm.png?alt=media&#x26;token=3840e35a-068c-4641-b40a-d25b5a325efd" alt=""><figcaption></figcaption></figure>

### Create certificate&#x20;

Go to Certificate tab. You will see a list of certificates you have created here.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FWcVLdFJlDr4tkrTBhoPw%2Fapple%20certificates.png?alt=media&#x26;token=6d5eceaf-7bb2-4cdb-8679-bc292f9c2b52" alt=""><figcaption></figcaption></figure>

In Certificates, click the add button (+) on the top left.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2F9SRHRVUFTDRrKe6Zx41h%2Fapple%20create%20certificate.png?alt=media&#x26;token=6f2e9c5d-ceee-4af7-8dd0-8f2adb0ff6ec" alt=""><figcaption></figcaption></figure>

Scroll down to "Services", select **Apple Push Notification service SSL (Sandbox & Production)** option and click Continue.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2F9unI4ZrsUGIC6dU0wckd%2Fapple%20certificate%20type.png?alt=media&#x26;token=26e7a88e-59d5-4009-8432-0738fdd6ba98" alt=""><figcaption></figcaption></figure>

Select the App ID you have created earlier from the list and click Continue.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FEdK2MJnJfqpjRY7Csa26%2Fapple%20certificate%20app%20id.png?alt=media&#x26;token=1d4d528d-e3d2-411a-8089-990b4d11e32b" alt=""><figcaption></figcaption></figure>

Now you have to click on the Choose File button and select the CSR (Certificate Signing Request) you have generated. Proceed with Continue button.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FVknYTcQBuWGUbERkbCeD%2F1599048052-7.png?alt=media&#x26;token=5363dad4-9c5b-4224-bb56-5c6a448178c7" alt=""><figcaption></figcaption></figure>

Download your certificate, then double click on the file to install it.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FatiISsDt8eczZ5dqOT5m%2Fapple%20certificate%20download.png?alt=media&#x26;token=0f53067a-74be-43e3-827b-e3795699f28e" alt=""><figcaption></figcaption></figure>

The installed certificate will appear in Keychain Access (which you have used to create CSR). Right-click on the certificate and export the file.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FvrI4vTmnKCmckX04nkZz%2F1559295659-2019-05-291632.png?alt=media&#x26;token=c9dac9ee-0942-45c4-9cb7-87a581390649" alt=""><figcaption></figcaption></figure>

Save certificate using Personal Information Exchange (.p12) format.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2Fcra4zvRhOq65EkiR9wou%2F1559295828-2019-05-291633.png?alt=media&#x26;token=29de1df5-b1c9-4608-b814-4c6a85b5ec27" alt=""><figcaption></figcaption></figure>

Enter password and remember it - you will need the password to integrate your project with APNS.

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FJkmARKuYGezSFO7Bvfc6%2F1559296350-2019-05-291634.png?alt=media&#x26;token=96d46fa0-b14a-48bd-954d-6bfb384ffeec" alt=""><figcaption></figcaption></figure>

After saving a certificate, go to [Providers view](https://app.pushpushgo.com/project/providers) (left-side navigation > [Providers view](https://app.pushpushgo.com/project/providers)) in the PushPushGo application, then scroll down to IOS Support.

Upload your certificate in a p.12 file format, type the passphrase with which you have secured the certificate, toggle 'Toggle production' (unless you want integration to work in development environment) and click Save.

Remember that your project can only have one appBundleId assigned - and it can only be changed via an IT ticket. By uploading new certificates you are only overwriting them, without changing other parameters, i.e. appBundleId. If another certificate containing appBundleId is sent - an error will be returned.

In case of uploading an expired certificate or if there are more certificates and keys in the store - an error will be returned.

Go to Integration section in PushPushGo application and upload your certificate.&#x20;

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2FbYp1BExqSIFtchHQO5Ng%2Fimage.png?alt=media&#x26;token=f918aced-82d9-44ae-8a61-be82597f5270" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2886427578-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M_L2jrbLGTIbcnHMUrm%2Fuploads%2F2goMzws9VWv4TRnQ4TQS%2Fimage.png?alt=media&#x26;token=6ee5c81e-23d8-4a13-a96c-6e72c6d520f4" alt=""><figcaption></figcaption></figure>

The flag will change from NOT INTEGRATED to INTEGRATED.&#x20;
