uilocalnotification

PhoneGap iOS LocalNotifications Daylight Savings

℡╲_俬逩灬. 提交于 2019-12-08 01:40:47
问题 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

Can I dismiss the local notification when next time the app launch?

霸气de小男生 提交于 2019-12-08 01:08:52
问题 I know I can cancel the notification when user tap this notification in notification center . But can I cancel the notification in other palce where I can't get the related local notification from system. Can I serialize the local notification, and cancel it when the app runs next time? Sorry for make you misunderstand! I want to dismiss a posted notification in the notification center, but not a scheduled one. So what I want to ask is how to save the local notification object, then I can use

Trigger UILocalNotification for every 14 days (fortnightly) Swift

寵の児 提交于 2019-12-07 20:13:19
The question has been already answered on SO. Here is the reference: iOS Notification Trigger: fortnightly and/or quarterly But what I have tried is so far: var fortnightPart1 = DateComponents() fortnightPart1.weekday = Calendar.current.component(.day, from: Sdate) //(Day..here Sunday) fortnightPart1.weekdayOrdinal = 2 //= n == (nth Day in the month...here 2nd Sunday in every month month) fortnightPart1.hour = Calendar.current.component(.hour, from: Sdate) fortnightPart1.minute = Calendar.current.component(.minute, from: Sdate) fortnightPart1.second = Calendar.current.component(.second, from:

how to recieve local notification in ios when app is closed

試著忘記壹切 提交于 2019-12-07 18:56:59
问题 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

Objective-C – UILocalNotification alertBody length

北城余情 提交于 2019-12-07 18:45:55
问题 I'm looking for some documentation to find the maximum length of the alertBody of a UILocalNotification before it will get clipped in either the notification center (banner) or in a popup alert. 回答1: I haven't found any specific limit documented. However, you can try it out and see that the notification drop down shows about 80 characters. This is on an iPhone 5S with iOS 7.1. The notification center shows more of the message. In this case about 138 characters before it starts truncating. Of

Local Notification When didEnterRegion?

大兔子大兔子 提交于 2019-12-07 17:24:51
问题 I have the following code which work perfect when app terminated. -(void)beaconManager:(id)manager didEnterRegion:(CLBeaconRegion *)region{ UILocalNotification *notification = [UILocalNotification new]; notification.alertBody = @"TEST NOTIFICATION"; notification.soundName = UILocalNotificationDefaultSoundName; [[UIApplication sharedApplication] presentLocalNotificationNow:notification]; } But When I do the following: -(void) createTestNotification { UILocalNotification *notification =

iOS – UILocalNotification fired twice for same notification

余生长醉 提交于 2019-12-07 13:48:03
问题 If I schedule two UILocalNotification s and set them both to fire at the exact same fireDate. Then on the device (this is not the simulator bug) on the fireDate the application:didReceiveLocalNotification: will fire 4 times (2 times for each notification). Is this a known bug? Because I have not been able to find any information about it. 回答1: Please report the bug to http://bugreport.apple.com. Having said that, it has been noticed before that while there is the bug in the simulator there

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

How to properly use the completionHandler when performing a background fetch?

戏子无情 提交于 2019-12-07 11:27:29
I'm having a hard time wrapping my head around using completionHandler inside performFetchWithCompletionHandler in the AppDelegate . My App does some background fetching, and during the fetch I would like to invoke a function that is located in one of my viewControllers What is the correct way to use the completionHandler , I'm aware that it is an asynchronous task. I managed to make it work when I wanted to send data to my database, but I'm unable to make it work when I want to invoke a function located in one of the viewControllers Attempt : What is the right way to call completionHandler ?

non-fixed repeatInterval in UILocalNotification

我是研究僧i 提交于 2019-12-07 07:01:08
问题 I've been cracking my head on this one for weeks now. What happens if I set the repeatInterval property of a UILocalNotification to be a non-fixed interval? (by non-fixed I mean units such as NSWeekdayCalendarUnit and NSWeekdayOrdinalCalendarUnit ). So say I have UILocalNotification with its fireDate set to the Wednesday in the current week, and I set the repeatInterval to be NSWeekdayCalendarUnit . Will it repeat every Wednesday? Is the same true for NSWeekdayOrdinalCalendarUnit ? So if I