Daily iOS
iOS system design

Photo library

Design a photo library app that shows tens of thousands of photos in a grid and backs them up to the cloud. Focus on grid scroll performance: thumbnail generation, caching, and memory.

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Device photos use PhotoKit (PHAsset) as the source, with PHCachingImageManager preheating and caching cell-size thumbnails. The app's own assets keep originals and thumbnails (2 or 3 sizes) in separate storage, draw the grid from a SQLite index, and cap the memory cache with NSCache byte costs.

Share a question