Confusing system service failure message when providing non-cvararg argument to localizedUserNotificationString

Originator:ualch9
Number:rdar://43007245 Date Originated:August 7 2018
Status:Closed Resolved:Duplicate OF 36558554
Product:iOS + SDK UserNotifications Framework Product Version:
Classification: Reproducible:
 
https://developer.apple.com/documentation/foundation/nsstring/1649585-localizedusernotificationstring

When providing a non CVarArg in NSString.localizedUserNotificationString, the system service responsible for user notifications fails but throws a confusing error with no details (`Adding notification request failed with error: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.usernotifications.usernotificationservice"`).

I believe it would be helpful to change the API to accept only CVarArg..., [CVarArg] rather than the current [Any] or adding a more helpful error message.

Code snippets: https://forums.developer.apple.com/message/325258#325258

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!