folgte ich der Dokumentation Führer Feuerbasis Website und haben alle die folgende Sachen:Firebase Cloud Messaging (FCM) in IOS App funktioniert nicht
1. der Code in AppDelegate.swift implementiert.
2. Die Pods zu meinem Podfile hinzugefügt und installiert.
3. Erstellt APN Authentifizierungsschlüssel in Certifictes, Identifiers & Profile in meinem developer.apple Konto und fügen Sie ihn in den FCM-Einstellungen.
4. Aktiviert Push-Benachrichtigung in Projektfunktionen (zwei v geprüft).
5. Erstellt Art Zertifikat: Apple-Push-Dienste für die Produktion
Ich habe einige Benachrichtigungen von Feuerbasis Konsole und erhielt nicht jeder in meinem iPhone (IOS 10.3). Irgendwelche Tipps was zu überprüfen? Was habe ich verpasst?
Podfile:
use_frameworks!
# Pods for App
pod 'Firebase/Core'
pod 'Firebase/Crash'
pod 'Firebase/Messaging'
AppDelegate.swift:
import UIKit
import Firebase
import UserNotifications
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
// Use Firebase library to configure APIs.
FirebaseApp.configure()
if #available(iOS 10.0, *) {
// For iOS 10 display notification (sent via APNS)
UNUserNotificationCenter.current().delegate = self
let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
UNUserNotificationCenter.current().requestAuthorization(
options: authOptions,
completionHandler: {_, _ in })
} else {
let settings: UIUserNotificationSettings =
UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
application.registerUserNotificationSettings(settings)
}
application.registerForRemoteNotifications()
return true
}
Vielleicht sind Sie mit Apple-Push-Dienste für Entwicklung könnten versuchen, nicht für die Produktion, da ich vermute, dass Sie App im Debug-Modus, nicht Ad-hoc-Version testen. –
Eigentlich habe ich das Problem in der Produktion gefunden. Soll ich die Remote-Benachrichtigung für Hintergrundmodi aktivieren? – LamaTo
Sie müssen nicht. Ich erhalte Push-Benachrichtigungen, ohne dass die Remote-Benachrichtigung für Hintergrundmodi aktiviert ist. Die Remote-Benachrichtigung für Hintergrundmodi wird nur verwendet, wenn Sie stille Benachrichtigungen benötigen. –