watchOS doesn't receive remote notifications if any values are null
| Originator: | keithbsmiley | ||
| Number: | rdar://28200025 | Date Originated: | 07-Sep-2016 19:15 |
| Status: | Duplicate of 26417371 (open) | Resolved: | |
| Product: | watchOS SDK | Product Version: | watchOS 3 GM |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: Currently if you send a push notification through apns to watchOS, if any of the values in the payload are `null`, the watchOS `didReceiveRemoteNotification` function of `WKUserNotificationInterfaceController` is not called. Steps to Reproduce: 1. Create a watchOS Swift project with a notification scene 2. In your generated `PushNotificationPayload.apns` file, add a custom key with `null` as the value 3. Put a breakpoint in the generated `didReceiveRemoteNotification` function 4. Run the notification scheme Expected Results: The breakpoint should be hit and the right notification handler should take over Actual Results: Since there is a `null` in the payload, the rich notification function is not called, and the static interface is shown. Version: watchOS 3 GM Notes: Use the attached sample project as an example. Delete the commented line from `PushNotificationPayload.apns` to see the rich interface.
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!