Building a baby memory book with SwiftUI

# buildinpublic# ios# mobile# swift
Building a baby memory book with SwiftUIBeforeGo

A photo can show a baby's first smile. A caption can preserve what happened just before it. That is...

A photo can show a baby's first smile. A caption can preserve what happened just before it.

That is the kind of detail I wanted Pagewren to make room for: a picture, a few words, and a page someone might want to return to years later.

I'm the developer of Pagewren, a baby memory book for iPhone. The central design decision was to put the book itself on the home screen. Add a memory, and it becomes part of the book you're already reading.

That decision also shaped some interesting engineering work.

Making each entry feel finished

The capture flow accepts photos, words, or both. Pagewren arranges the content into a page, with chapters organized around the child's age.

For a keepsake app, that immediate result matters. If saving a memory also leaves you with a layout task, there is more work waiting the next time you open it. I wanted the output of a small entry to feel complete enough to keep.

There are no daily streaks. Parents can add an ordinary moment, leave a gap, and come back later. Batch photo import helps them bring older memories into the book too.

Sharing the page renderer

Pagewren is built with SwiftUI. Its book pages use a shared BookPageView that receives the page content, the selected style, and the rendering width.

The PDF exporter uses that same view through ImageRenderer, drawing it into a PDF graphics context. Page dimensions and typography scale from the page width.

This keeps layout decisions in one place. Changing how a theme places a photograph does not require a separate implementation of that layout for export.

The rendering context still needs a few differences. A printed page has square corners. Interactive controls belong in the app. But the composition comes from the same component.

One detail that matters here is image loading. Export does not wait for an asynchronous image request to finish. The page renderer therefore receives a synchronous image source, so the photos are available when the page is drawn.

It is a small interface choice with a visible consequence: a page exported with its pictures in place.

Measuring words before splitting pages

Pagination becomes more involved once a memory can include a short caption, a long story, or a list.

Pagewren measures text using TextKit and the font and available text area for the chosen layout. A photo page has less space for words than a text page. Different themes also leave different amounts of room.

The page break follows the laid-out lines. List items and embedded elements need their own handling so they do not get split arbitrarily across pages.

For this app, measuring the actual text is much more useful than treating a page as a fixed number of characters. The visible line breaks are what determine whether the words fit.

Keeping the book on the device

The persistence layer uses Core Data, with optional CloudKit mirroring for Pro users.

The app can open the local store without enabling sync. When CloudKit cannot be initialized, the persistence controller attempts to open the same store locally. That fallback keeps the storage path centered on the book already on the phone.

There is no Pagewren account to create. Book content stays on the iPhone and, when sync is enabled, in the user's private iCloud database. Usage analytics and crash reporting are separate from the photos and writing in the book.

For the public details, see the app's privacy information on the App Store.

Letting people take the book with them

PDF export is a useful part of the product: it gives the parent a file they can save or share. Individual pages can also be shared as images.

That requirement makes the shared renderer more than a code organization preference. Exported pages are part of the experience people keep outside the app.

Pagewren is available on the App Store. It is free to download and use with the Classic theme. Pro adds themes, iCloud sync, and Privacy Lock, with monthly, yearly, and lifetime purchase options.

I'd be interested to hear from other developers building journals or tools for personal archives: how do you keep the capture flow small while giving people something satisfying to come back to?