Build WordPress Client App with React Native #24 : Setup Firebase Push notification [iOS]
Tags: firebase, reactnativewordpre, reactnativefirebas
Published: 2019-12-14 12:10:12

---
title: Build WordPress Client App with React Native #24 : Setup Firebase Push notification [iOS]
published: true
date: 2019-12-14 03:31:45 UTC
tags: Firebase,React native Wordpre,firebase,react native firebas
canonical_url: https://kriss.io/build-wordpress-client-app-with-react-native-24-setup-firebase-push-notification-ios/
cover_image: https://cdn-images-1.medium.com/max/1024/1*0qWyQ1BHUL6FoFfa-uPTYg.png
series: Build Wordpress Client App with React Native
---

This series intends to show how I build app to serve content from my WordPress blog by using react native. Since, my blog is talking about react-native, the series and the articles are interconnected. We will learn how to set-up many packages that make our lives comfortable and learn how to deal with WordPress APIs. Here, the most prominent features talked about in the book are the dark theme , offline mode, infinite scroll and many more. You can discover much more in this series.this inspiration to do this tutorial series came from the [React Native Mobile Templates](https://www.instamobile.io/) from instamobile

In case of wanting to learn from the beginning, all the previous parts for this tutorial series are available below:

1. [Build WordPress Client App with React Native #1: Overview](https://kriss.io/build-wordpress-client-app-with-react-native-1-overview/)
2. [Build WordPress Client App with React Native #2: Setting Up Your Environment](https://kriss.io/build-wordpress-client-app-with-react-native-2-setting-up-your-environment/)
3. [Build WordPress Client App with React Native #3: Handle Navigation with React navigation](https://kriss.io/build-wordpress-client-app-with-react-native-3-handle-navigation-with-react-navigation/)
4. [Build WordPress Client App with React Native #4: Add Font Icon](https://kriss.io/build-wordpress-client-app-with-react-native-4-add-font-icon/)
5. [Build WordPress Client App with React Native #5 : Home Screen with React native paper](https://kriss.io/build-wordpress-client-app-with-react-native-5-using-react-native-paper/)
6. [Build WordPress Client App with React Native #6 : Using Html renderer and Moment](https://kriss.io/build-wordpress-client-app-with-react-native-6-using-html-renderer-and-moment/)
7. [Build WordPress Client App with React Native #7: Add pull to refresh and Infinite scroll](https://kriss.io/build-wordpress-client-app-with-react-native-7-add-pull-to-refresh-and-infinite-scroll/)
8. [Build WordPress Client App with React Native #8: Implementing SinglePost Screen](https://kriss.io/build-wordpress-client-app-with-react-native-8-implementing-singlepost-screen/)
9. [Build WordPress Client App with React Native #9: implement simple share](https://kriss.io/build-wordpress-client-app-with-react-native-9-implement-simple-share/)
10. [Build WordPress Client App with React Native #10: Setup and save bookmark](https://kriss.io/build-wordpress-client-app-with-react-native-10-setup-and-save-bookmark/)
11. [Build WordPress Client App with React Native #11: Remove and Render Bookmark](https://kriss.io/build-wordpress-client-app-with-react-native-11-remove-and-render-bookmark/)
12. [Build WordPress Client App with React Native #12: Categories screen](https://kriss.io/build-wordpress-client-app-with-react-native-12-categories-screen/)
13. [Build WordPress Client App with React Native #13: Configuring firebase in contact screen](https://kriss.io/build-wordpress-client-app-with-react-native-13-configuring-firebase-in-contact-screen/)
14. [Build WordPress Client App with React Native #14 : Implementing Settings Screen](https://kriss.io/build-wordpress-client-app-with-react-native-14-implementing-settings-screen/)
15. [Build WordPress Client App with React Native #15 : Forwarding message to inbox with Cloud function](https://kriss.io/build-wordpress-client-app-with-react-native-15-forwarding-message-to-inbox-with-cloud-function/)
16. [Build WordPress Client App with React Native #16 : Dark theme](https://kriss.io/build-wordpress-client-app-with-react-native-16-dark-theme/)
17. [Build WordPress Client App with React Native #17 : Fix react-native-render-html to change theme](https://kriss.io/build-wordpress-client-app-with-react-native-17-fix-react-native-render-html-to-change-theme/)
18. [Build WordPress Client App with React Native #18 : changing Theme](https://kriss.io/build-wordpress-client-app-with-react-native-18-manually-changing-theme/)
19. [Build WordPress Client App with React Native #19 : Notify user when offline](https://kriss.io/build-wordpress-client-app-with-react-native-19-notify-user-when-offline/)
20. [Build WordPress Client App with React Native #20 : Saving data to cache](https://kriss.io/build-wordpress-client-app-with-react-native-20-saving-data-to-cache/)
21. [Build WordPress Client App with React Native #21 : Splash Screen on iOS](https://kriss.io/build-wordpress-client-app-with-react-native-21-splash-screen-on-ios/)
22. [Build WordPress Client App with React Native #22 : Splash Screen on Android](https://kriss.io/build-wordpress-client-app-with-react-native-22-splash-screen-on-android/)

for setup push notification in iOS require apple developer account (99$/year) first we get a certificate from developer dashboard then add the certificate to firebase then add Firebase messaging pod then activate push notification on iOS

## Configuring APNs with FCM

The Firebase Cloud Messaging APNs interface uses the Apple Push Notification service (APNs) to send messages up to 4KB in size to your iOS app, including when it is in the background.

To enable sending Push Notifications through APNs, you need:

An Apple Push Notification Authentication Key for your Apple Developer account. Firebase Cloud Messaging uses this token to send Push Notifications to the application identified by the App ID. A provisioning profile for that App ID. You create both in the [Apple Developer Member Center](https://developer.apple.com/account/).

![](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/16ba7db8-5eaa-43b3-858a-ae1f2fcc6f87/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAT73L2G45IOHIKFH7%2F20191214%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191214T032557Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEOD%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLXdlc3QtMiJIMEYCIQDEInSOVpcmXywm99HdOJ%2B%2B37ff6LAwIsHdePdiilLwBgIhAMBBoXIUZBJ19zbXcLqwISmEURRJgxsO3gZFLj0l%2FpDwKtECCDkQABoMMjc0NTY3MTQ5MzcwIgw%2BuSlK346J5VuEmoEqrgK30PQTUX24U8qGdb2AzzK9QgQT%2FWRZ9Pg9kwWDuRwlW3VD%2FOezQpb8LBCSCACZWpsl4i%2F5sARyptCUJOOkfOgLiKSeGNoTbYuDNL1%2B7bWPWj5jLlgax%2Bae5gj%2FuazE8ppStdRrUqOEqWs893Jc0nMGJcVNM7CpeyJe%2BlJP66%2BeBppcKMUfHXpn8aHAUqTrx9qVkTj%2B2OyNe8PD81uj3fgTubiPuQt1%2BQ32Kx9VW4fYekhKKTtcrTAYS5DzMKkkocayReiLm613Bp3eQ%2B0F9jLphcnpitC1gimFvn4dui4YXf6AaAfl2WTIcb2bdWaE1nceZDAwrwLeaDVTSCx3OGygZB5LnS%2Fc7aLXFB7pRUynJBS3H7aEiVKmpj5q1xxDtgoYRRZ%2FiknlSODCWUgxyjDVutDvBTrNAo4T7BQQNlO2C15F1hXSVVlcktPRilghwxD1fLUF6gWcItmsC4mU43Kvga1tZXkDgMadw%2FEqVq6qAQ8ysiD8ReNPtDJlOMJI2Up6VPoOlJPmWC6%2BWEGFkZZkQLjfkEPgbT377DEIIeFjJ4O8pM0BHY6njtutmIVsPpQyRPZiHtBP1DQsnM9g9YGziwglEi5fUacXqn2dQHxCpm8xiCAPIPJIh5JIBjH9CX3psuSLyZ0qsc9btLK6WBtWYdTxKPVTwzuVzME4rIYrMUIhiZoLEb%2B9Appx%2BUOa30WzjQiAiWopBhkxUe4poJDYZN2fj2HD3RCv9utBjdZUGEnK8o6w2I9T88rpdvF56QMRFSXsOSIvbTdaIWes%2BMhlXJBT2Z9LeKS90xpgut32UE0l6WO0Uf%2Fz12wdijBS1QtId3Th60Pcmh3lyx8%2FllrOrbBroA%3D%3D&X-Amz-Signature=39e0230d3428379917080ddcf4d4f7aab3a37ab39b09437163d6579c4ee993af&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22)

## Create the authentication key

This section describes how to generate an authentication key for an App ID enabled for Push Notifications. If you have an existing key, you can use that key instead of generating a new one.

To create an authentication key:

In your developer account, go to Certificates, Identifiers & Profiles, and under Keys, select All.

Click the Add button (+) in the upper-right corner.

![](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/02ff03b4-b011-4197-b3f2-e4b0d558545f/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAT73L2G45NYLJ6476%2F20191214%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191214T032615Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEN%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLXdlc3QtMiJHMEUCIQCK0cuGNjUGkJfjDeq0AYmNbCshrbdayxk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748f1bff12da50fdedeb309d1b6bb917599c44222f598003db3ee530948&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22)

Enter a description for the APNs Auth Key and under Key Services, select the APNs checkbox, and click Continue.

![](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/99f4d212-e50b-4b69-9dbc-fb079d23a35d/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAT73L2G45HZLOUC6E%2F20191214%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191214T032637Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEN%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLXdlc3QtMiJHMEUCIQDBAVWIcpZYds362jQ7%2FxTSP7BzIt1ErqUxlmuJuk3DowIgQPfjy6u1eiQuHjgXMoCNHhQk34jCuyDPCO4QPiUyCmYq0gIIOBAAGgwyNzQ1NjcxNDkzNzAiDPu42NAeA353ffrQ%2FyqvAskrhiHOGNFGuvucVet93J9RLB%2F1GN1VMmm9sj1U2i3fo%2Foc9qk9jXXIxlSc4OHNphr1DtUv0wLpyfXxXPoDo3XBoeB0et65SozbqMBIkpJhW5JozxY4odcN9tUxwMObcBPH9LOJrCUGnimgFfFEgMaF8f2NSvbZs84lDWel8TKWsYWKYbL71cuQcvWhlM4eoU002hzgGWzm9vHIY7UXq9NFjkqPEFXZ06cn1I17qe3qtAC8mos5B7RVFJE7s271mYOAT0WeYICheEZvb54SsmEyzOcxV%2B7MiLPB%2F5H0Z72yBgoRJkQtx7BjyApTX3vOlwHbrnWqOmxkDPpovU50X0Tp83cw%2BWkBpTATM6z%2BePS%2BHE2BWVCKPR2YzylPLojmLQ3oYKgTdpka%2FkyHEnA96TD%2FptDvBTrNAoXc6f5eJYnHj96%2BoGhHRGrRD9rALu1A75ApW4qrmYLNwxDvp7avCZ8X80sePPKWQSVxUTVAWvt5JEnn2jYdIJZj%2B7247%2FECpxYPKi%2FGouYyqK5Xyq7PP%2FV8ANFwInvfAA2Dzx5b379fhE0U9iqI8y9OGwDWGlrNFuPnQPTMy0cUuZBIceUoacdZw7xzhkHh3NBTTz8EW8W%2FY4k6hi%2BtwIz4dOJpN9zin4z2MFzINiS4%2FwnfEZajFBQgBGCkjMTx5oXvSYWDn%2F24aH6WFbMhUVRT08tnKwFqQCGe55Wc5RJvvDZuIs8Uwt7wXUA6LvUDOIzABN7y9JMjVdHnCOVzchJTwLZ3v6%2FmP2XcZlpxgMsgpDbF7s32cFt447%2Bf62uvJ%2BA%2BYEpK8XiE2P1BOUEYKKMrKFTSLhnSGZKeIknrWC%2B5IX6J%2BF%2BDWbMX9hjW5A%3D%3D&X-Amz-Signature=69957b192381565d051e9a967b6efb78b756742fcea834e5e8313b1aee250a27&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22)

Click Confirm and then Download. Save your key in a secure place. This is a one-time download, and the key cannot be retrieved later.

![](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/01707227-af14-475a-ab5a-93624fc15312/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAT73L2G45GKDHZPGQ%2F20191214%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191214T032755Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEN%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLXdlc3QtMiJHMEUCIQDRMdqaj8oHMehtNIX%2BJSw7y6%2FxRr0HyQJuB%2FA9TKOQCwIgL%2BoK8%2FjgZD7RSSR6QT%2B1flGJWlQ%2F%2FzZu3uPVgqs53MUq0gIIOBAAGgwyNzQ1NjcxNDkzNzAiDN3DmPE62xVF95VZpCqvAo%2BObJBkZj1pDOOeFRJdQ363lWF%2BdoQJxQjHYTswElSxmdE%2Bb%2Fg%2F%2BGAeqRbmoBAxgQq1XEtXTg3IOyYzYC3DpLNf58p3yD3GUrWiernBLozbQdeVkJHC2t%2ByAj%2BkvsObn8b8o5iwTqD7XmMLXyRF9HtBZAj9f8ab85GrCdbKixLY0eAxpA%2FQv4O%2FIYwEOmpMOJtR2DadV%2FFyxgTZPPMPUGPNV4GRxKMOpbkKUc0qo0HPJD3R4aljEcTfqZizZby2l2k5i1M1Q64kgrL0%2BdVYpALpqyB5TQoStCxKrLBbvIsThJbDxvx1Xh%2FqIA%2BOYTK4sIvLhmtguT%2FwAH19uESdSIguEgsL33uLp%2F9nr86PlQJv1aN5qEbSkR694hDsv4x4%2FBGftCGqpKJQALRufwMG%2BTCet9DvBTrNAtXfMnyboW0%2FFa5bmeamPCe6mYEnPfrJIiys%2FXNdjL0SNYuQLc2h9nAVwt01C3tiuSwR4056kUO%2BKTwTU5dymplTHhcZwpV8zJQrPtNZdcUB5qRvYo%2F3qjFyaxDFNEY1ax%2BVrcPvwStxsxcWWykEnH77uK5LpVssc0A2SqKUhc6PeFgd4sFr5dvTSWDcFUudKE27%2BedNncenekh0Tz3YYmlmkJljKusfpW6XIo3cbHfv0eP3Nnbq4fwfyUUbVMiNFMvzwtoe62FKeeV0DCWKHmUyqi9BH14xc2Mu5M8BBfuvepGrqXN%2Bj7Q2wA4WPZsJdmgjVjVQGvJWnqPRJ7imCcyId9eq89dI6Sjlfy5p%2Fm17%2FRkqxud64Z3dVhnlzY0U1rjr6cawCZK%2F6CvrjVCcjJz78JogciKWt0tRyKlSzariqPJmvmQGJxZUEmxJxQ%3D%3D&X-Amz-Signature=6ddede4acafe194a5efe733fc4809466b666a2703ae4373ef94bd118227a78cf&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22)

If you’d like to verify that your APNs authentication key is set up properly and is accepted by APNs, try sending a test push notification.

## add the certificate to firebase

next step we add certificate to Firebase console goto [cloud messaging setting](https://console.firebase.google.com/u/0/project/krissapp/settings/cloudmessaging)

upload certificate to app that we want then add Key ID same with Team ID

![](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/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75IiXQ2e8EYeolXVwfxxHGXZYyhgoc%2FcQG1aSORDcy3NuULlMnjvyfGuKPxwxCHfHIJ7%2FUU6eNJZhmf9%2FEiK8nZOURg2NW1xA4%2B3LzW3bbGelXTXfrIFy6sKk0e9lMdyOCIa4AKKnAUSyh5BY1pI%2BLPPD08mipI2REv8cQfodA1yMpeyPnp5%2FXDuC9vU33t1iSKLgNE4FkGe25HQwY0%2FfPtD7kth2sGhHmC4yl0STJA%3D%3D&X-Amz-Signature=2a0c7aba54e58edd4b88b59a020434013fd50406212080ddf392d3435193b87a&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22)

we all done on Firebase side now Firebase server can send message to APN

## Setup in Device

next we goto setup our app to handle push notification

first add firebase messaging pod to Pod file

```
pod 'Firebase/Messaging'
```

then run `cd ios ; pod install`

### activate push notification in Xcode

next we open our app on XCode then activate push notification in Signing & Capability hit **+ Capability**

![](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/ebf2a67f-040f-4881-aacf-009042322b27/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAT73L2G45CDBPKDLO%2F20191214%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191214T032838Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEN%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCXVzLXdlc3QtMiJHMEUCIGfnMms9bkpp8D4ByNkAqOSVSGoB%2F6MCPlsbtc8gXtJEAiEAhnaDMxFLXUNJqHwJ6c4b3%2BeWExjZIFfKjWIHZuEqOBQq0QIIOBAAGgwyNzQ1NjcxNDkzNzAiDHaYPpi0zBM%2BYxF3kCquAvaZkwg0mPNtcDE8VBwU4fem3WYvvTVc7y3kGOGOUhepcnRjcXfEIdtvKcZmz5Cedqq2InV1fO1J3gGWyjhkkol0NkpG4Bopa%2FcTVk9i0YFj%2BU5hebS9K8ryAb3gZmZJuyUOzzbsoRkJxETWtgGXr8%2B8WlrG5LfkwN50Uig91qb4H04FxVO6F1QWDnJzQIPtjc860RqD4Ovbf5rW1uaWeh9Z3Hc%2F5toLt4LenBTrVzgY1iamGXv3gJrrDBWRDDjxbJ0jx3cdQWII%2FGs3uMpi6mkumC%2BN%2BS3uqeMX6S%2FcqPneQJVfqRBczNcO50V5SCudoC8wbZYYtCyQUEAU8b0NnuJAbUCjGPb43SODaMVz72btFCuoC4qvTdcJ%2F4743gUgpm5NeszMe34iEC5dPQa1MKyt0O8FOs4CaWU3GnReZYqsPkFo6HNBePYEPerEUiWhBECdrkB6os5JJtv6F%2FNzhzl8Odd8OZ%2B2r9QOmPGnNypqPhIqaWhlBbilBqWDppz6hxbajfAZrR4WmoNknE2OAObSYmEtXkzRZgYFwJFrrlBvL36DpSYYmfpLAxpmfK4CELQKeA5dkhDCbUOS3xvvD%2FKIesfavHgZw4vcPJi8BoUYngEoxm8WScUjPS3ZK7i9UPm2jxGe6gCtpJnpal76cq%2FxypFdlUJL4cpPr6RehxHwTe6qO9cb34gu7fuM9ye%2Fej5raEz3luXji%2FF7nEZBVXP2DIYqIuMSSXak4MD0qddnxohfo1Uw1s9xCs6UH3x56qJqScprgx%2Bjhrf9pAkqT15LRpwtxoMLShzuhoepUmomI%2BrjcYvQLYzNHSOnl4UqslG%2BGpv%2BU4Jj0s%2FlPS2jwuFwnYSN3A%3D%3D&X-Amz-Signature=94bf60426cb8cea4d2ff80e91aaf471c3aec9f6b945717feb87b6c2f77e3f574&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22)

then search and add push notification

![](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/320c97f3-a203-40ee-bdbc-867cbcfd3cc4/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAT73L2G45LZGVKJGT%2F20191214%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20191214T032858Z&X-Amz-Expires=86400&X-Amz-Security-Token=IQoJb3J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8c5Pzty8Wjc8h6w%2BUkO38Oeei89Ch17%2FLBpf4OIY6aWdbvF9UxjlXcFWiJC0omsFSQEkfdg%3D%3D&X-Amz-Signature=ef2a582ceb79c942d2ec13d38384455280cefd1a4896e2f8006769f8bdaef473&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22)

last step we activate messaging on Appdelegate.m first import Firebase Notification lib

```
#import "RNFirebaseNotifications.h"
```

then we activate lib .by add code below near Firebase lib

```
if ([FIRApp defaultApp] == nil) {
    [FIRApp configure];
    **[RNFirebaseNotifications configure];**
  };
    **[[UNUserNotificationCenter currentNotificationCenter] setDelegate:self];**
  return YES;
}
**- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
  [[RNFirebaseNotifications instance] didReceiveLocalNotification:notification];
}**
```

## Summary

in this chapter, we learn how to setup Firebase push notification on iOS also set up a certificate and finish everything on Xcode

The post [Build WordPress Client App with React Native #24 : Setup Firebase Push notification [iOS]](https://kriss.io/build-wordpress-client-app-with-react-native-24-setup-firebase-push-notification-ios/) appeared first on [Kriss](https://kriss.io).