push-notifications-firebase-swift | Push Notifications with Firebase in Swift | Notification library
kandi X-RAY | push-notifications-firebase-swift Summary
kandi X-RAY | push-notifications-firebase-swift Summary
Push Notifications with Firebase in Swift 5 - Starter Kit (Google Cloud Messaging)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of push-notifications-firebase-swift
push-notifications-firebase-swift Key Features
push-notifications-firebase-swift Examples and Code Snippets
Community Discussions
Trending Discussions on push-notifications-firebase-swift
QUESTION
I am using FCM to create and send push notifications for my iOS app.
Dev Environment:
Xcode 11.3
iPhone X running iOS 13.3
Swift 5.2
Pod Versions:
- Firebase 6.14.0
- FirebaseMessaging 4.1.10
- FirebaseInstanceID 4.2.8
Problem:
Prior to running into an issue, I had setup my app to be able to receive notifications when the app was in both the background and the foreground. Very happy with myself I committed the code. After this point I have been unable to receive notifications in the foreground OR the background. Regardless of using whether the notification is sent from Cloud Messaging dashboard or POSTMAN, I receive a successful response but the notification never appears.
At first I thought I may have hit the notification quota but it is now 2 days post fact.
To troubleshoot I have tried:
- Uninstalled and re-installed the app (Which refreshes the device token)
- Moved
UIApplication.shared.registerForRemoteNotifications()
to beforeFirebaseApp.configure()
- Downloaded a fresh GoogleService-Info.plist and replaced existing
- Checked that bundle id's etc all match
- Updated firebase pods to latest (FirebaseMessaging was at 4.1.9 if that helps)
- Set
Messaging.messaging().shouldEstablishDirectChannel = true
- Removed and Re-added the needed capabilities
- Set
FirebaseAppDelegateProxyEnabled
to both YES and NO - Set
shouldEstablishDirectChannel = true
- Set
useMessagingDelegateForDirectChannel = true
- Moved some logic from didFinishLaunchingWithOptions() to applicationDidBecomeActive()
Code:
Note: This is the unaltered code that originally worked for me.
AppDelegate.swift
...ANSWER
Answered 2020-Jan-09 at 20:34I was able to resolve the issue by moving
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install push-notifications-firebase-swift
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page