From time to time widget crashing with "unable to load" error. Is anyone know how to fix it? Widget haven't requests to server or smth else.
7 Answers
Unable to load in today extension mostly appears when:
- You extension crash due to some reason
- It takes more memory than what is provided by the system. (Memory Limit : max 16MB approx.)
Debug your app extension to find out the exact problem.
Refer to Xcode's Debug Gauge for Memory and CPU utilization.
Edit:
Debugging today extension
You can debug your extension the same way you debug your main project. Just select that particular target scheme
in your Xcode and run the project.
Now try using the breakpoints and other print statements in the extension’s code and you are good to go. Happy coding..

- 23,751
- 6
- 34
- 88
-
Second part was my problem. Just removed a few images and it's work properly. – Ildar.Z Mar 20 '17 at 08:05
-
1Please let me know how to debug the Widget? – nitin.agam Oct 05 '18 at 09:17
-
@iDev750 I've updated the answer for debugging the widget. – PGDev Oct 05 '18 at 16:04
-
@PGDev Thank you and I have solved my problem. Actually, I was getting crashed because UIImageView was unable to find the image which was I'm using. Thank you! – nitin.agam Oct 08 '18 at 07:32
REBOOT the device.
This saved me.

- 407
- 5
- 6
-
2Thank you for this tip! Was very helpful in addition to the accepted answer. – Mikrasya Jun 23 '21 at 02:24
I have faced this error I used a custom view. But forgot to check Is initial viewController. Set an entry point form "show attribute inspector" as an initial view controller

- 1,886
- 22
- 30
I have faced the same issue where it wasn't showing anything. Even my debug option was not working. I found an article online which helped me a lot. I would like to recommend this here.
Most of the time it is the size of the content view that crashes the widget. in that case, use this code snippet in TodayViewController.
Code snippet
override func viewWillAppear(_ animated: Bool)
{
var currentSize: CGSize = self.preferredContentSize
currentSize.height = 200.0
self.preferredContentSize = currentSize
}
Link for further research.

- 4,422
- 1
- 27
- 33

- 820
- 9
- 15
Make sure you have more than 0 rows
I have built a today-widget similar to Building a Simple Widget for the Today View.
I had none of the above issues. Mine was 0 row (I had no data for this particular day and hence, 0 row). I did not expect that it could be the problem since in the main-app, you can have empty table-view.
If you see unable to load
message, make sure you have at least 1 row.

- 12,366
- 5
- 48
- 83
Set this in viewDidLoad
:
extensionContext?.widgetLargestAvailableDisplayMode = .expanded

- 6,247
- 2
- 35
- 68

- 448
- 3
- 12
In my case NotificationCenter.framework
was accidentally deleted from Link Binary With Libraries
in Build Phases
tab in widget target.

- 183
- 7