uilocalnotification

How to check Notification alert style for our app?

社会主义新天地 提交于 2019-12-06 11:35:59
问题 What exactly I wanted is to change the Notification Alert Style to "Alerts" But came to know that we can't do it programatically. Now lets come to the Scenario, I have a UILocalNotification set with the repeatinterval = kCFCalendarUnitMinute . So each minute it shows new notification in the notification Window if I don't cancel it. Now Say, I have kept the device idle for 10 minutes then I will be bombarded with 10 notifications though I have set a single notification with repeatinterval.

Local Notification is not displayed in iOS 10

馋奶兔 提交于 2019-12-06 11:08:12
i have tried this Code in Appdelegates. @import UserNotifications; UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; [center requestAuthorizationWithOptions:(UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert) completionHandler:^(BOOL granted, NSError * _Nullable error) { if (!error) { NSLog(@"request authorization succeeded!"); center.delegate = self; } }]; And the local notification is fired by this code -(void)localNotification{ NSLog(@"local notification fired"); UNMutableNotificationContent *objNotificationContent =

iOS limitation of 64 local notifications

☆樱花仙子☆ 提交于 2019-12-06 10:47:05
问题 I know that this topic is a duplicate, but I need your help. It is very important for me and the other posts have no really an solution for me. I have an app (Swift 2) where the user can save entries in core data. These entires will show in a table view. The user has to set an reminder date (with a date picker) for each entry. This date will use for the fire date of the local notification. Each entry get 2 local notifications First fire date: 1 week before the chosen date, second fire date:

Swift - Local Notification doesn't get triggered

北城以北 提交于 2019-12-06 10:37:56
I am coding in Swift 3 and I am simply trying to send a notification now without any delays or intervals. However the notification never gets triggered. Here's my code.. The ViewController code import UserNotifications class HomeViewController: UIViewController{ var isGrantedNotificationAccess:Bool = false override func viewDidLoad() { super.viewDidLoad() UNUserNotificationCenter.current().requestAuthorization( options: [.alert,.sound,.badge], completionHandler: { (granted,error) in self.isGrantedNotificationAccess = granted }) if isGrantedNotificationAccess{ triggerNotification() } } /

PhoneGap iOS LocalNotifications Daylight Savings

☆樱花仙子☆ 提交于 2019-12-06 09:20:19
I'm using (the infamous) Drew Dahlman's Phonegap Local Notifications in iOS . And it seems to work. I have never written a line of objective-c and would prefer not to (which is probably why I'm having trouble now!) but I think the plugin is not working quite right and would like to fix it if possible. When I set a notification for today at 13:00 it fires correctly. However when daylight savings is in play the notification fires at 14:00, an hour late. Is this because timezones are not being taken into account? Drew mentions that the timezone being set to +0000 is not a problem, but is this mis

How to respond to local notification when app is closed in iOS10?

余生颓废 提交于 2019-12-06 07:30:08
问题 How to respond to local notification when app is completly closed (not in background)? When the app is running in the background or foreground everything works fine. But when the app is closed and I'm trying to answer to a notification, only "application didFinishLaunchingWithOptions" gets called, "userNotificationCenter didRecive response " isn't answering. I found this question (How to handle UNNotificationAction when app is closed?) but in my case it doesn't work neither at a real device

UILocalNotification not firing

回眸只為那壹抹淺笑 提交于 2019-12-06 07:08:22
问题 I am very new to Cocoa Touch and Objective-C but I've gotten the pretty big points down and I am experimenting with the UIKit. I have a action linked to a button that changes a label and fires a UILocalNotification and this is the action method: - (IBAction)changeLabel:(id)sender { self.LabelOne.text = @"WHAT UPPP!"; self.NotifyOne.alertBody = @"Testtttttt"; self.NotifyOne.alertAction = @"Got It."; self.NotifyOne.fireDate = nil; } There are no errors or warnings, but it's just not firing. Is

scheduleLocalNotification doesn't work for jailbreak apps?

匆匆过客 提交于 2019-12-06 06:31:47
问题 I have an app that calls scheduleLocalNotification , but it doesn't work when I install it to /Applications instead of /var/mobile/Applications : - (void) doNotify { // this doesn't work when app is in /Applications but does in /var/mobile/Applications UILocalNotification * theNotification = [[UILocalNotification alloc] init]; theNotification.alertBody = @"Finished processing."; theNotification.alertAction = @"Ok"; theNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:1]; [

how to recieve local notification in ios when app is closed

半城伤御伤魂 提交于 2019-12-06 06:05:31
I am using local notification for alarm system but I am facing some problem while handling local notification, When i clicked on alarm notification (When app is closed) its launches app but the problem is it should go to didFinishLaunchingWithOptions function but it's not going inside any of the function in appDelegate (I used breakpoints to check). I'm using story board with navigation controller, I want to open a specific view controller on notification click when app is closed. but when I'm launching that app normally it's going inside didFinishLaunchingWithOptions function. Please suggest.

iOS - Local notifications - cancelAllLocalNotifications

假如想象 提交于 2019-12-06 04:57:17
May be a simple question: When I call "cancelAllLocalNotifications", does it cancel notifications created by the app only or it will cancel all notifications from other apps also? The notifications created by other apps will not be affected. From: Local and Push Notification Programming Guide "You can cancel a specific scheduled notification by calling cancelLocalNotification: on the application object, and you can cancel all scheduled notifications by calling cancelAllLocalNotifications." Although, this is probably not the best written sentence, the "on the application object" applies to