Apple Watch notification issue: WatchKit error - unable to find interface controller class to instantiate

后端 未结 1 904
自闭症患者
自闭症患者 2020-12-12 05:29

I am getting the following error when I am trying to push my notification controller dynamically.

2015-03-30 13:18:53.324 MyApp WatchKit Extension[798

相关标签:
1条回答
  • 2020-12-12 06:07

    Two things to recheck,

    • When you have created a new subclass of WKUserNotificationInterfaceController, Have you selected Watchkit extension as a target instead of iOS app target? You can verify this by Select Project > Select Watchkit Extension Target > Build Phases > Compile Sources. Here you should see NotificationInterface.m file created earlier. If you can't see then you have selected wrong target when creating a file. Then solution is you can create a new class with correct target selected.
    • In Storyboard, make sure custom class name is correctly added. Also in Payload file, category name should match with category set to storyboard scene just to avoid future errors.
    0 讨论(0)
提交回复
热议问题