uilocalnotification

Assure Delivery Of UILocalNotification on correct time ios

我只是一个虾纸丫 提交于 2019-12-24 08:34:57
问题 I'm having a problem with my local notification that is: if the device is in off state or when changing the date of phone , the notification is kept in queue and firing along with next notification. Why? Since need to have very concern about the date of notification.. How to assure correct delivery of notification? Where should we put code for removing expired notification? 回答1: So you mean you had a notification named ABC to be triggered in 30 minutes...but then you turned your iPhone off

Weekly local notification

99封情书 提交于 2019-12-24 06:38:26
问题 I have a small question how could I do a weekly local notification. My app is about a time table when the user has a class on 8 o'clock then there is a switch when user tern the switch on that mean he has a notification on 7:45 to remained him every week on the same time . I hope u understood me . 回答1: You can use repeatInterval with NSWeekCalendarUnit UILocalNotification *localNotification = [[UILocalNotification alloc] init]; localNotification.repeatInterval = NSWeekCalendarUnit;

Local Notifications for Corona SDK (Android)

僤鯓⒐⒋嵵緔 提交于 2019-12-24 00:57:09
问题 Is there a way to implement local notifications while using the Corona SDK? This is android specific, as we have already found the iOS directions. Cheers! 回答1: Local notification for now is iOS only on Corona... The Android version is not done yet. When it gets done I will see to edit this with the directions of the android version. 回答2: Local notifications are done for iOS and Android: http://docs.coronalabs.com/api/library/system/scheduleNotification.html It doesn't appear there is a way to

Local notification in iOS coming without any sound

这一生的挚爱 提交于 2019-12-24 00:39:02
问题 -(void)notifyMe { UILocalNotification *localNotification = [[UILocalNotification alloc] init]; localNotification.fireDate = [NSDate dateWithTimeIntervalSinceNow:0.1]; localNotification.timeZone = [NSTimeZone defaultTimeZone]; localNotification.alertBody = @"Alert"; localNotification.alertAction = @"Local notification"; localNotification.soundName = UILocalNotificationDefaultSoundName; localNotification.alertLaunchImage = nil; localNotification.userInfo = nil; [[UIApplication sharedApplication

UILocalNotification Not Working … No Vibration on iPhone 4 iOS 4.3

醉酒当歌 提交于 2019-12-23 15:00:13
问题 I would write as much as I could write here, but the Title pretty much says it all. I've tested it in several different situations: 1) Phone on, silent mode off, app on, in foreground, screen unlocked I know that this goes through app delegate's didReceiveLocalNotification and didn't expect a sound or vibration, except for the handling code that I included under didReceiveLocalNotification. The handling code actually called NSURL *Sound = [[NSBundle mainBundle] URLForResource: self

How to put notifications on iOS application to repeat every one (1) hour?

Deadly 提交于 2019-12-23 03:13:16
问题 I tried to put notifications in my app, it was supposed to repeat every one hour but it repeat unregulated, to be clear, it repeats sometimes 30min sometimes one hour sometimes for a long time etc.. Code that I used in "AppDelegate.swift": class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application

Trouble segue-ing to a uiviewcontroller from appDelegate upon UILocalNotification - with SWRevealViewController in the mix

纵饮孤独 提交于 2019-12-23 03:03:24
问题 I'm using iBeacons and am trying to respond to the UILocalNotifications they trigger. Everything works fine there and I'm able to display my message content in the notification. I want to be able to launch a specific UIViewController when the user swipes the notification. Currently, according to NSLog output, I'm very close. The tricky bit is that I'm using SWRevealViewController for its cool slider-window menu features and so the segue is crapping out and saying, *** Assertion failure in -

Set local notification for everyday at midnight

删除回忆录丶 提交于 2019-12-23 02:32:55
问题 I'm trying to create a simple notification that will appear every day at midnight. This is the code I use: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Override point for customization after application launch. application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Sound | UIUserNotificationType.Alert | UIUserNotificationType.Badge, categories: nil)) var thisDate

Set local notifications for particular days and time swift 3

独自空忆成欢 提交于 2019-12-22 11:35:43
问题 In my app, i want to add local notifications. The scenario will be that the user can select any time and days from Mon to Sun. For example, if the user selects Mon, Thur and Sat as days and time as 11:00 pm, so now the user should be notified at all the selected days and that particular time. Code: let notification = UNMutableNotificationContent() notification.title = "Danger Will Robinson" notification.subtitle = "Something This Way Comes" notification.body = "I need to tell you something,

How to remove the cancel ApplicationIconBadgeNumber from LocalNotification?

南楼画角 提交于 2019-12-22 10:46:06
问题 I am using LocalNotification in my app. It is working fine but once ApplicationIconBadgeNumber is set, not able to remove it from App. How to remove it? 回答1: You need to set the application applicationIconBadgeNumber. For example in the application didReceiveLocalNotification. - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notif { application.applicationIconBadgeNumber = notif.applicationIconBadgeNumber-1; } 来源: https://stackoverflow.com