WatchKit Error - no notification payload

624 Views Asked by At

I'm receiving the following error, even though I added the NotificationPayload.apns file to my project.

WatchKit Error - no notification payload. Add a payload to your WatchKit extension to populate your notification controller.

How do I resolve this issue?

2

There are 2 best solutions below

1
bgilham On

Make sure your scheme is set up correctly. Check here: https://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/ConfiguringYourXcodeProject.html#//apple_ref/doc/uid/TP40014969-CH2-SW8

To test your notification interface with the JSON payload, configure the build scheme with the appropriate payload file. When you select a notification interface executable, Xcode adds a menu for choosing one of your payload files. You can create different build schemes for different notification payloads, or you can update the payload file for an existing build scheme before testing.

0
ScottyB On

You will also get this message if your JSON payload file isn't valid JSON. You can always validate it at http://jsonlint.com to be sure.