iOS 8 Today Extension not working on device

后端 未结 8 1987
我在风中等你
我在风中等你 2021-02-20 10:10

When I run my Today Extension on the simulator everything works fine and it displays the following as expected:

\"en

8条回答
  •  长情又很酷
    2021-02-20 10:54

    The sources of my problems:

    • on simulator viewDidLoad was called each time, on the device the view is loaded once and only viewWillAppear is called.
    • the widget does not receive core data changes notifications
    • do not call NCWidgetController.widgetController().setHasContent from widgetPerformUpdateWithCompletionHandler. The best place to use it (mostly) is your containing app, not the widget itself.

    hope this helps someone

提交回复
热议问题