{"id":21768125,"url":"https://github.com/below/widgetsample","last_synced_at":"2026-05-14T23:41:36.371Z","repository":{"id":66512648,"uuid":"554878418","full_name":"below/WidgetSample","owner":"below","description":"Demo Project for a WidgetKit issue","archived":false,"fork":false,"pushed_at":"2022-10-20T15:48:52.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-26T02:44:10.571Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/below.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-20T14:54:07.000Z","updated_at":"2023-01-30T01:08:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"c20ab2b6-4ea0-4efc-a6f3-cf895e18592a","html_url":"https://github.com/below/WidgetSample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/below%2FWidgetSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/below%2FWidgetSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/below%2FWidgetSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/below%2FWidgetSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/below","download_url":"https://codeload.github.com/below/WidgetSample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745707,"owners_count":20503048,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-26T13:33:41.342Z","updated_at":"2026-05-14T23:41:36.345Z","avatar_url":"https://github.com/below.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WidgetSample\n\nAfter solving my last SwiftUI [issue](https://gist.github.com/below/a5008d74b7786233f6442e81ecfe0c5c), here is my next issue.\n\n## Primary Objective\n\nMy Widget displays pictures from a list. If I load in all the pictures when setting up the timeline, I run into a memory issue (`EXC_RESOURCE RESOURCE_TYPE_MEMORY`), because Widgets have a strict limit on how much memory they can use.\n\n## My Solution\n\nInstead of storing a `UIImage` in my timeline entry, I store the URL to the picture, and load it with a `.task` attached to the view.\n\nThis works, when the view is displayed in the app, and is also shown in the Preview window.\n\n## The Problem\n\nThe image is apparently loaded, but not updated for the Widget. Not if running in the simulator or on device, or in the Preview canvas.\n\n## The Question\n\nObviously: Am I doing it wrong? Do I need to update my timeline more conservatively? Can I load the pictures on demand? Is there a different way of doing this?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelow%2Fwidgetsample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelow%2Fwidgetsample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelow%2Fwidgetsample/lists"}