steelkiwi / AppDelegate-Firebase

Example of using Firebase PushMessages in iOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AppDelegate-Firebase

Example of using Firebase PushMessages in iOS

Instruction

  1. Add these pods to your project
pod 'Firebase/Core'
pod 'Firebase/Messaging'
  1. Add GoogleService-Info.plist file to your project

  2. Copy AppDelegate+Firebase.swift file to your project

  3. Add next code to your AppDelegate didFinishLaunchingWithOptions method:

initNotifications(application: application)
  1. Add fcm token handling (storage / sending / etc) logic into didReceiveRegistrationToken method

  2. And add this method to your AppDelegate file:

internal func openNotification(userData: PushNotification) {

    // Push handling here
}

Example of AppDelegate

About

Example of using Firebase PushMessages in iOS


Languages

Language:Swift 100.0%