Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this earlier implementation of Googles GCM method: https://gist.github.com/prime31/5675017 - FCM is the new method and GCM will eventually be retired.
THE BELOW METHOD IS THE NEWER FCM METHOD:
Register your app in the FCM Console: https://console.firebase.google.com (add project)
- Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings.
- Click on the GEAR settings icon, and then on "Project Settings"
- In the main screen, click on "Cloud Messaging"