Post

Replies

Boosts

Views

Activity

Problems Notifications Firebase
I've followed Apple's suggestions to implement push notifications with Firebase, but I can't get notifications. I have created the APNS key in firebase and I have activated the notifications in the app. In Siginig & Capabilities I have added "Push Notification" "Background Modules" activating Remote notifiactions. This is the code in AppDelegate: import UIKit import FirebaseCore import FirebaseMessaging @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool{ //Firebase FirebaseApp.configure() // Push Notifications UNUserNotificationCenter.current().delegate = self let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] UNUserNotificationCenter.current() .requestAuthorization( options: authOptions, completionHandler: {_, _ in}) application.registerForRemoteNotifications() Messaging.messaging().subscribe(toTopic:"topic_general") return true } } extension AppDelegate: UNUserNotificationCenterDelegate{ // Push Notifications Mostrar aunque el movil este activo / Segundo Plano func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandle: @escaping (UNNotificationPresentationOptions) -> Void){ completionHandle([.alert, .badge, .sound]) } }
1
0
794
Apr ’22
Problems Notifications Firebase
I've followed Apple's suggestions to implement push notifications with Firebase, but I can't get notifications. I have created the APNS key in firebase and I have activated the notifications in the app. In Siginig & Capabilities I have added "Push Notification" "Background Modules" activating Remote notifiactions. This is the code in AppDelegate: import UIKit import FirebaseCore import FirebaseMessaging @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool{ //Firebase FirebaseApp.configure() // Push Notifications UNUserNotificationCenter.current().delegate = self let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] UNUserNotificationCenter.current() .requestAuthorization( options: authOptions, completionHandler: {_, _ in}) application.registerForRemoteNotifications() Messaging.messaging().subscribe(toTopic:"topic_general") return true } } extension AppDelegate: UNUserNotificationCenterDelegate{ // Push Notifications Mostrar aunque el movil este activo / Segundo Plano func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandle: @escaping (UNNotificationPresentationOptions) -> Void){ completionHandle([.alert, .badge, .sound]) } }
Replies
1
Boosts
0
Views
794
Activity
Apr ’22
xcode camera error with input file images
The app is a webview where there is a form where an input file image is loaded. The problem is that when selecting an image from the camera, the app crashes. If you can upload images from Photo LIbrary and Choose File
Replies
0
Boosts
0
Views
1k
Activity
Apr ’22