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

断了今生、忘了曾经 提交于 2019-11-28 14:42:00

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.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!