0

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?

4

2 回答 2

1

确保您的方案设置正确。在这里查看:https ://developer.apple.com/library/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/ConfiguringYourXcodeProject.html#//apple_ref/doc/uid/TP40014969-CH2-SW8

要使用 JSON 有效负载测试您的通知界面,请使用适当的有效负载文件配置构建方案。当您选择一个通知界面可执行文件时,Xcode 会添加一个菜单来选择您的有效负载文件之一。您可以为不同的通知负载创建不同的构建方案,也可以在测试之前更新现有构建方案的负载文件。

于 2015-04-15T13:34:43.313 回答
0

如果您的 JSON 有效负载文件不是有效的 JSON,您也会收到此消息。您可以随时在http://jsonlint.com上对其进行验证。

于 2015-06-03T02:20:00.903 回答