watchOS 3: Static Notification should have some way to include the title
| Originator: | robotspacer | ||
| Number: | rdar://27553405 | Date Originated: | July 26 2016, 4:36 PM |
| Status: | Closed | Resolved: | 07-Jun-2017 |
| Product: | watchOS SDK | Product Version: | watchOS 3 (14S5290d) |
| Classification: | Other Bug | Reproducible: |
Summary:
I'm using the new UserNotifications API to handle notification in iOS 10 and watchOS 3. This solves a big frustration I had with the old notifications API: the notification title is now displayed almost everywhere. Unfortunately there seems to be one case where it's still missing: static notifications on watchOS. In the static interface, there's only one label that gets populated with the actual notification data, notificationAlertLabel. According to both the documentation and my own testing, this only gets populated with the "body" data from the notification—not the title (or subtitle).
Steps to Reproduce:
1. Create an iPhone app with a Watch app.
2. Have the iPhone app display a notification:
UNMutableNotificationContent *content = [UNMutableNotificationContent new];
content.title = @"Title";
content.body = @"Body";
content.categoryIdentifier = @"alert";
UNTimeIntervalNotificationTrigger *trigger = [UNTimeIntervalNotificationTrigger triggerWithTimeInterval:3.0 repeats:NO];
UNNotificationRequest *notificationRequest = [UNNotificationRequest requestWithIdentifier:notification.identifier content:content trigger:trigger];
UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
[center addNotificationRequest:notificationRequest withCompletionHandler:^(NSError * _Nullable error) {
if (error) NSLog(@"Failed to schedule notification: %@, %@",error,error.userInfo);
}];
3. Run the app and let the notification appear on the Watch.
4. Ignore the notification.
5. Swipe down on the red dot to show missed notifications. (See attached Screenshot 1)
6. Tap the notification. (See attached Screenshot 2)
Expected Results:
I would expect to see all of the notification data, including the title and subtitle.
Actual Results:
Currently only the body text appears. Confusingly, the list of notifications actually does include the title (see Screenshot 1 with the title "Test"). Once you tap on the notification, it's gone (see Screenshot 2).
Ideally, there would be a separate label outlets in the static UI so we can control the appearance of the title and subtitle separately from the body. At the very minimum, the existing notificationAlertLabel should also include the title and subtitle.
Version:
watchOS 3 (14S5290d)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Fixed in iOS 11 / watchOS 4
Interface Builder now includes a notificationTitleLabel that can be used for your static notification layout.