ios - WatchKit 错误 - 没有通知负载

标签 ios iphone watchkit xcode6.3 ios8.2

即使我将 NotificationPayload.apns 文件添加到我的项目中,我仍收到以下错误。

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

如何解决这个问题?

最佳答案

确保您的方案设置正确。在这里查看: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.

关于ios - WatchKit 错误 - 没有通知负载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29650960/

相关文章:

swift - 在两个接口(interface) Controller 之间传递数据

ios - Xcode 5.1 : Where have the delta iOS 6/7 settings gone?

ios - 架构 arm64 的 undefined symbol - Cocoa Pods

ios:捏手势只发生一次

iphone - 使用标签/UILabels/UIViews

ios - 从 UICollectionViewController 导航到 UIViewController 时 UIViewController 闪烁

ios - Focus相关的Picker控件方法

ios - 如何在不替换旧应用程序的情况下安装新的 "version"应用程序?

iOS - CNContactStoreDidChangeNotification 通知细节差异

ios - 尝试将 MMWormhole.h 导入我的 WatchkitExtension InterfaceController.h 时出错