Categories
Development

I can’t send a Firebase Cloud Messaging push notification to my app i followed the steps but got nowhere

I followed the steps and created an APN key and uploaded it, however it doesn’t seem to recognize my app whenever i try to send a message through the cloud messaging part of firebase it says (0% of potential users are eligible for this campaign: 0). This is my entire app delegate file.My app can […]

Categories
Development

didReceiveRemoteNotification is not called when app was opened from notification

if remove notification was received when app was active – it’s handling good. if app was at background orinactive – nothing happend. notifications are getting from Firebase Cloud Messaging. xcode 11.3.1 func application(_ application: UIApplication, didReceiveRemoteNotification userInfo [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { if application.applicationState == .active { Utils.handlePushNotification(userInfo: userInfo) // […]

Categories
Development

Open link in webview, using firebase in app messaging

My app is a webview app. Please, explain me, how to open link in my webview app when I press “Открыть” button? Now, when I press the button, link redirects and opens in Safari. The message appears via firebase in app messaging. Thank you. import JXWebViewController import UIKit import Firebase import UserNotifications import FirebaseInAppMessaging @UIApplicationMain […]

Categories
Development

How to run the function without showing the push message when it is sent?

I have a problem to solve with a push message. If I send a push message to Firebase,I will receive it well and I will see the message well. And when I click on the push message, the userNotificationCenter function in the AppDelegate file is executed and the list of actions in the function is […]

Categories
Development iOS

Push Notification issue with FCM in iOS13

I am using FCM for push notifications. I used to refresh the content of the app using the below method func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { Now with iOS13 this method is not firing anymore. I have included apns-push-type and apns-priority as well.

Categories
Development

How to fetch data inside a push notification?

I am new to push notification and I managed to get the push notification working. And now whenever a push notification comes and if I press it, the app will open and goes a page. This is my push notification message {“to”:”eHPnnkSDzWk:APA91bHs…”,”data”:{“message”:”test notification”,”type”:”5″}} and these are the types Gallery ( Type = 1 ) Messenger […]

Categories
Development Swift

Why can’t I get a push message in Swift5?

I am currently trying to get a push message. However, you cannot receive a push message. What am I missing? AppDelegate import UIKit import UserNotifications import Firebase import FirebaseMessaging @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { self.window = UIWindow(frame: UIScreen.main.bounds) // Override […]

Categories
Development

how to swizzle didReceiveRemoteNotification of AppDelegate from framework

I’m developing a framework for iOS apps (a pod). I want to swizzle application(_:didReceiveRemoteNotification:fetchCompletionHandler:) with a method defined in my framework. this is my code: class MyClass { @objc func myCustomizedMethod(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) { // my code } private func swizzleDidReceiveRemoteNotification() { guard let […]

Categories
Development

Stopped receiving firebase notifications completely suddenly

I am setting up ios 12 push notifications for an application at work. They worked perfectly for the first 2 days, and then suddenly completely stopped. I have no access to the firebase server. I send an api key and device id via a post and the web app registers the device on the server. […]

Categories
Development

How use Firebase Push notification

I tried using Firebase Push notification in my app and somehow, the push notification doesn’t work, I tried following several guides and nothing worked(and most were outdated). So I tried again and followed the firebase tutorial from googlepage. Still nothing works, can somebody please help me out here? This is my my appDelegate import UIKit […]