SpacePod 42 Save & Open Images

Опубликовано: 17 Июль 2026
на канале: Kern Jackson
29
0

SwiftUI's AsyncImage cache policy isn't adequate for our use, which means we're hitting the network too much. Let's write our own CachedAsyncImage view that will...

1. Fetch images given a url
2. Save images to the documents directory
3. Load images from the documents directory
4. Act as a drop in replacement for AsyncImage

For now we'll just implement Step 2 and 3.

Goals

1. Dramatically decrease network traffic
2. Local image storage for future features

Code & Notes https://github.com/kernjackson/SpacePod
Api https://api.nasa.gov

We'll progressively build a small SwiftUI app that displays the NASA photo of the day. Each video will be broken down into the smallest piece of work that I can imagine at the time.own into the smallest piece of work that I can imagine at the time.