Today Widget tableView freezes Today Widget tableView freezes ios ios

Today Widget tableView freezes


What the system does is that it takes a Snapshot. I have also been struggling a bit with this issue and I have checked this post but it did not solve my issue.

For the widgetPerformUpdateWithCompletionHandler there are three options

  1. NCUpdateResultNewData — The new content required you to redraw the view
  2. NCUpdateResultNoData — The widget doesn’t require updating
  3. NCUpdateResultFailed — An error occurred during the update process

It does not matter which one of these is called it´s always the same result. And the system does take a Snapshot.

To help your widget look up to date, the system occasionally captures snapshots of your widget’s view. When the widget becomes visible again, the most recent snapshot is displayed until the system replaces it with a live version of the view.

To update a widget’s state before a snapshot is taken, be sure to conform to the NCWidgetProviding protocol. When your widget receives the widgetPerformUpdateWithCompletionHandler: call, update your widget’s view with the most recent content and call the completion handler, using one of the following constants to describe the result of the update

Reference.

I think that we´re maybe trying to load to "heavy" data and this could occur because of that. This is my answer, but I started a bounty to check if someone else has another answer or if you agree with my post.


You can put your operation in viewdidload(), because viewdidload() will be called when you enter you widget.