unnotificationrequest

Limit for Local Notifications (UNNotificationRequest) in iOS 10

六月ゝ 毕业季﹏ 提交于 2020-01-21 06:41:07
问题 I know that the limit of local notifications is 64 for UILocalNotification . It's written in Apple Dev Docs. But UILocalNotification is deprecated in iOS 10. Instead this one, Apple proposes to use UNNotificationRequest . But Apple Dev Docs doesn't say anything about limiting the count of notifications. I found this answer, but it doesn't have links to Apple Dev Docs or something like that (it's just an opinion). Does anyone know for sure about restrictions of local notifications? Maybe

How do I set an NSCalendarUnitMinute repeatInterval on iOS 10 UserNotifications?

随声附和 提交于 2020-01-09 05:18:07
问题 In UILocalNotification we use NSCalendarUnitMinute like repetition ..... but I can't find in iOS 10 UserNotification doc ... How can I use NSCalendarUnitMinute like repetition in iOS 10 UserNotification ? here is the code which will schedule local notification at 8:30 pm and will repeat after every one minute. UILocalNotification* localNotification = [[UILocalNotification alloc] init]; localNotification.fireDate = pickerDate; localNotification.alertBody = self.textField.text;

Not Getting push notification in Notification tray (at top) while App in foreground iOS

拟墨画扇 提交于 2020-01-05 05:39:21
问题 I tried lot to get modified notification while app is foreground .... By Creating Notification Service Extensions In Background and killed success to modified but in foreground only Getting Original Payload in alert body not in notification . HERE In NotificationService.m File @implementation NotificationService - (void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void (^)(UNNotificationContent * _Nonnull))contentHandler { self.contentHandler =

How do I check my applicationIconBadgeNumber value?

╄→尐↘猪︶ㄣ 提交于 2019-12-31 03:55:20
问题 I want my redDot to display when I have some value in badge, i.e UIApplication.shared.applicationIconBadgeNumber this is the code I wrote, but doesnt seem to work : import UserNotifications @IBOutlet weak var redDot: UIImageView! override func viewDidLoad() { super.viewDidLoad() runCheck() } func runCheck(){ if (UIApplication.shared.applicationIconBadgeNumber>=1) { self.redDot.alpha=1 } else { self.redDot.alpha=0 } } 回答1: Based on our conversation in chat about this, you have three things you

iOS 10 How to set UNotificationContent threadIdentifier for remote notification

我怕爱的太早我们不能终老 提交于 2019-12-30 07:07:27
问题 TL;DR: What key needs to be set in the APNs notification payload JSON to correspond to the threadIdentifier property of the UNNotificationContent object? e.g. the "category" key corresponds to the categoryIdentifier property. iOS 10 introduces the Notification Content Extension allowing us to present a view controller when a notification is expanded. The view controller that we provide conforms to the UNNotificationContentExtension protocol, that requires us to implement the didReceive(_:)

Repeating local notification removes previous pending local notifications

白昼怎懂夜的黑 提交于 2019-12-25 02:17:03
问题 I want to send local notification after every 30 minutes. I have implemented repeating local notification but it removes the preceding local notifications. The scenario is as explained : My client wants to get night alerts. He wants that when he wakes up in the morning he can check all the notification alerts at once. Here is the code: func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point

iOS 11 new notification center removes all delivered notifications after user make any action with one of them

偶尔善良 提交于 2019-12-24 02:26:45
问题 I have an issue on iOS 11. All delivered notification automatically removing from notification tray after I select any action for one of them. This happens before my code start handling action. In iOS 10 everything is ok, all delivered notifications stay in delivered and disappear only notification where I proceed some action. My app schedule reminders with custom action, 2 buttons Activate and Stop. User can receive many of them in one day, but its very important to keep already delivered

UNNotification: Custom Sound for LocalNotification is not playing in iOS10

风格不统一 提交于 2019-12-20 04:19:06
问题 I am firing the Local Notification. Since UILocalNotification class is deprecated in iOS10 I have used UserNotifications.framework When i try to set the custom sound for notification, the default sound is playing all time. here is my code: - (IBAction)fireLocalNotification:(id)sender { UNMutableNotificationContent* content = [[UNMutableNotificationContent alloc] init]; content.title = [NSString localizedUserNotificationStringForKey:@"Hello!" arguments:nil]; content.body = [NSString

Use UNNotificationRequest (UserNotificationFramework) for data only local notification on iOS

Deadly 提交于 2019-12-13 15:12:13
问题 I would like to use the UserNotificationFramework on iOS 10 to send myself data only notifications -- i.e., with no user facing text or sound. Basically to use it as a persistent timer to be able to trigger the app, if running when it fires, to check for things like session timeout due to token expiry. Kind of like an analog to a "content-available" faceless push notification in a local notification. I have it all working except I cannot get a notification to fire without some sort of user

iOS 10 Notification Content Extension not loading

给你一囗甜甜゛ 提交于 2019-12-13 12:34:44
问题 I have a bare-bones app to play with push notifications. I have the Notification Service Extension working. I can send a remote notification with an image URL and have it load. I can't seem to get Notification Content Extension working. I've gone through multiple tutorials and they all say, just create a Notification Content Extension from the target menu and then inside the Notification Content Extensions Info.plist set the UNNotificationCategory to some string. Then when you push the