localnotification

How to show multiple local notifications?

一个人想着一个人 提交于 2019-12-10 22:13:46
问题 I have an messaging app,I am using VoIP notifications to send acknowledgement to users. I am firing a local notification each time the PushKit delegate is called. The current scenario is that the previous notification gets removed and is replaced by a newer one. Is there a way to manage local notifications such that the user can see multiple notifications in their device? This is the code I have tried: let notificationContent = UNMutableNotificationContent() notificationContent.title = "Title

Local Notification alternative week repeat

时光毁灭记忆、已成空白 提交于 2019-12-10 21:27:08
问题 I Have two notification and I want to repeat it alternative week. E.g. One notification set on 1st week's monday and it should repeat on 3rd week's monday. Second notification set on 2nd week's tuesday and it should repeat on 4th week's tuesday. What should I do for this? 回答1: Get week number and make decision according to week number 回答2: -(NSString*) getWeekOfMonth { NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterMediumStyle];

Launch Closed iOS App From Local Notification

て烟熏妆下的殇ゞ 提交于 2019-12-10 13:25:27
问题 When my iOS application is running in the background it responds fine to - (void)application:(UIApplication *)application didReceiveLocalNotification: (UILocalNotification *)notification but when the application is closed it crashes and gives a SIGKILL error. How can I run a method within the app if it is closed when the notification is received? 回答1: You can't run a method in the app when a local notification is received. The notification can provide any combination of an alert, icon badge

how to implement multiple local notification not a single notification for swift 3

不羁的心 提交于 2019-12-09 17:09:15
问题 i have use the single notification , and this is my code: this is for register the local notification>>> func registerLocal() { let center = UNUserNotificationCenter.current() center.requestAuthorization(options: [.alert, .badge, .sound]) { (granted, error) in if granted { print("Yay!") } else { print("D'oh") } } } and this function to schedule the local notification>>> func scheduleLocal() { registerCategories() let center = UNUserNotificationCenter.current() // not required, but useful for

Firebase local notifications

二次信任 提交于 2019-12-09 03:24:57
问题 Is there any possibility to fire local notification when there is a callback from Firebase ? I've got a problem with threads I guess, [Firebase setDispatchQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)]; 回答1: You can achieve above functionality as follow. 1 ) observeEventType method is call when any changes occurs in firebase database 2 ) Implement observeEventType method as follow. // Below statement is point to your database. let ref = FIRDatabase.database().reference()

Is it possible to send SILENT LOCAL notification on iOS

谁说胖子不能爱 提交于 2019-12-08 15:32:30
问题 My app wakes up from suspended mode on silent remote notification from a server, exactly as I want. This server sends a push notification with " content-available :1", which does the job. Now I want to do this without the help of a server and so I want to send silent local notifications (from the app) at a time in the future (like after 15 min.), but can't find a way to set "content-available:1". So I end up getting local notification that doesn't wake up my app, as I can with remote

Cordova Local Notification

你说的曾经没有我的故事 提交于 2019-12-07 19:26:51
问题 Hi I am developing a program. I integrated local notification to program, but problem is that i cant do it repeatly everyday . plugin I used this plugin and wrote this code in index.js in device ready. it is working normally but when i add first time for notification it gives error. cordova.plugins.notification.local.schedule({ id: 1, text: "Come and Evaluate your Friends!", firstAt: tomorrow_at_11_am, every: "day" }); firstAt: tomorrow_at_11_am part is not working. How can i fix this

Is it possible to open running background app on in Objective c

假装没事ソ 提交于 2019-12-07 18:57:04
问题 open my app from background running on a specific timing.. want to do somthing like this - (void)applicationDidEnterBackground:(UIApplication *)application { timer = [NSTimer scheduledTimerWithTimeInterval:10 target:self selector:@selector(timerFired:) userInfo:nil repeats:NO]; } - (void)timerFired:(NSTimer*)timer { NSLog( @"yes it is running..."); PickUpCallViewController *call=[[PickUpCallViewController alloc]initWithNibName:@"PickUpCallViewController" bundle:nil]; navi=[

getting local notification while the app is in background

孤人 提交于 2019-12-07 14:32:47
问题 while the app is in background didReceiveLocalNotification is not called. So I try to get the notification from didFinishLaunchingWithOptions - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions { UILocalNotification *notification = [launchOptions objectForKey:UIApplicationLaunchOptionsLocalNotificationKey]; //... } But My App is with Background Mode enable (using external accessory communication) When click on the notification,

Handling local notifications when the user presses the icon instead of the alert

喜欢而已 提交于 2019-12-07 13:40:23
问题 Here is the situation that I want to handle quoted from Apple's documentation. As a result of the presented notification, the user taps the action button of the alert or taps (or clicks) the application icon. If the action button is tapped (on a device running iOS), the system launches the application and the application calls its delegate’s application:didFinishLaunchingWithOptions: method (if implemented); it passes in the notification payload (for remote notifications) or the local