Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apple Watch notification error "Unhandled Category"

I'm working with Apple Watch Notifications. I defined my own category "myAppcategory" and passed the same to notification payload. But, still i'm receiving below warning in XCode.

Warning: Notification category "(null)" not found. Define this category or a default category in your storyboard.

And result in watch simulator is below

enter image description here

Can any one help me to fix this issue?

like image 297
Teja Kumar Bethina Avatar asked Apr 10 '15 07:04

Teja Kumar Bethina


2 Answers

I recently had the same issue. For me it was an invalid push notification payload. If you're using a .apns file (for example the sample one provided for notification controllers) to test make sure it's formatted correctly.

like image 147
NRimer Avatar answered Nov 01 '22 13:11

NRimer


This issue is most probably is caused after a mistaken edit that broke the formatting on the PushNotificationPayload.apns file. To resolve this issue fix the formatting in your .apns file.

The most problematic part is when you add data to alert. Make sure you add comma after each entry, except last one.

"alert": {
    "body": "Test message",
    "title": "Optional title",
    "name": "MyName"
},

Like this.

like image 37
Mohammad Zaid Pathan Avatar answered Nov 01 '22 14:11

Mohammad Zaid Pathan