remote-notifications

Fatal Exception: NSInternalInconsistencyException Crash on iOS

混江龙づ霸主 提交于 2020-04-17 20:59:10
问题 Been trying to recreate and research about this issue for days now and I'm not going anywhere. Here's the stack trace. Can anyone shed light on to what's happening? I take that it has something to do with remote notifications. The issue started a while back when I installed the firebase sdk. Back then it wasn't a lot but now, crashes seem to happen more often than usual. Fatal Exception: NSInternalInconsistencyException this request has been neutered - you can't call -sendResponse: twice nor

Using URLSession and background fetch together with remote notifications using firebase

天大地大妈咪最大 提交于 2020-01-21 19:15:48
问题 I am trying to implement a basic func here which will be called when my app is backgrounded or suspended. In reality, we aim to send about 5 a day so Apple should not throttle our utilisation. I've put together the following which uses firebase and userNotifications, for now, it is in my app delegate. import Firebase import FirebaseMessaging import UserNotifications @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? var

Push notification not showing in Android foreground

拟墨画扇 提交于 2019-12-30 06:26:31
问题 I've used react-native-fcm for remote notification in android and iPhone. react-native-fcm In Android foreground I'm not be able to getting remote notification in notification bar. In background mode I'm able to getting notification successfully but some how in foreground doesn't. Android Manifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.nusape"> <application> <receiver android:name="com.evollu.react.fcm.FIRLocalMessagingPublisher"/> <receiver

How to clear the remote notification in your app?

旧巷老猫 提交于 2019-12-20 12:28:49
问题 Is there a way to clear the remote notification from the notification banner when swiping down from the top of the iPhone screen. I tried setting the badge number to zero: application.applicationIconBadgeNumber = 0 in delegate didFinishLaunchingWithOptions , and didReceiveRemoteNotification , but it did not clear the notifications. Thanks. 回答1: You need to set the IconBadgeNumber to 0 and cancel the current notifications. I never did in swift but I think the code for it would be as bellow:

How to detect Remote notification in didFinishLaunchingWithOption application method in objective c?

徘徊边缘 提交于 2019-12-20 05:47:24
问题 when app in not in background mode ,inactive mode and app is completely closed. than how to detect is their any notification using application's delegate "didFinishLaunchingWithOption" method. i have searched a lot about it but not get anything. please help . Thanks 回答1: Below methods is used for notifiaction - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UILocalNotification *notification = [launchOptions objectForKey

IOS notification when Application is closed

筅森魡賤 提交于 2019-12-18 04:17:21
问题 i have a ios application where to which i send remote notification when sending notification from server i am setting content -available = 1 and sound = "" When on IOS device i am using applicaiton(didReceiveRemoteNotification:fetchCompletionHandler:) I seeing that app reaches this method when in background but when app is closed this method is not getting called But is not getting called when application is closed applicaiton(didReceiveRemoteNotification:fetchCompletionHandler:) My handler

IOS 9 not asking permission for remote notifications

≡放荡痞女 提交于 2019-12-12 04:31:21
问题 I have a problem when trying to ask permission for remote notifications. It works flawlessly on iOS 10 but when I try to do it on an iOS 9 device it doesn't show any alert and the UIApplication delegate method "application:didRegisterForRemoteNotificationsWithDeviceToken:" isn't called. Neither the "failed" method. I'm only testing on real devices, not simulator. The code I currently use for asking permission is the following: -(void)requestPushPermissions { NSLog(@"Starting register for

Handle the remote notification for chat application in iOS

前提是你 提交于 2019-12-12 03:59:48
问题 Hi, BACKGROUND I am buidling a chat messaging applicaiton and I faced problem to handling push notificaton when user receiving message from the sender.IV ACHIEVE Like Whatsapp does, after I received the push notification and I turned on the airplane mode, I still can see the message contains while I open the app. so, I believe it has get the message while receiving the notification. PROBLEM I cannot find a good way to handle the remote chat message push notification when user open the app

Launching iOS app when it's not running via silent notifications

给你一囗甜甜゛ 提交于 2019-12-12 02:14:57
问题 According to Apple's official documentation, if one sends a "silent notification", i.e. a notification with content-available: 1 we have For background download apps: A push notification arrives for an app and the payload of the notification contains the content-available key with a value of 1. The system wakes the app at opportunistic moments to begin downloading new content. For apps downloading content in the background using the NSURLSession class, all tasks associated with that session

AppDelegate Never Gets Its didReceiveRemoteNotification Called For CKQuerySubscription

人盡茶涼 提交于 2019-12-11 15:18:30
问题 I'm trying to let the iOS app listen to CKQuerySubscription changes. Data is transmitted by a remote iOS app. I already have a macOS application, which does receive data sent by the remote iOS app. The iOS app I have trouble with already has a subscription. Yet, its AppDelegate never receives a call in the didReceiveRemoteNotification method. import UIKit import UserNotifications import CloudKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate,