r/iOSProgramming • • 17h ago

App Saturday App Saturday: Near, a countdown app built on SwiftData, CloudKit sharing, WidgetKit and on-device Foundation Models

Hi all. I'm the solo developer of Near, a countdown and count-up app for iPhone with photo widgets and shared countdowns.

Tech Stack

  • Swift 6 with strict concurrency, SwiftUI, iOS 26
  • SwiftData for storage, CloudKit sharing for countdowns shared between family members
  • WidgetKit (Home Screen and Lock Screen widgets) and ActivityKit (a Live Activity on the day itself)
  • Foundation Models (Apple's on-device model) for natural-language entry, with a heuristic parser as fallback
  • StoreKit 2 for the Near+ purchase, App Intents
  • XcodeGen for the project file

Development Challenge
Photo widgets kept rendering blank with no error. Widget extensions have a tight memory budget, and full-size photos from the library blow straight past it. The fix: downsample with ImageIO (CGImageSourceCreateThumbnailAtIndex, max 800 px, without decoding the full image) before the photo goes into the timeline entry, then re-encode as JPEG. The widgets have been reliable since.

A second one: natural-language entry ("Mom lands Dec 22 at 6pm") uses the on-device model, but it isn't available on every device or language, so a rule-based parser handles the same input when the model can't.

AI Disclosure
AI-assisted. I built it with Claude Code as a pair programmer: it wrote a lot of the SwiftUI and boilerplate under rules I set in the repo, and I designed the app, made the architecture decisions, and debugged and tested everything on device.

Free with up to three upcoming moments; Near+ is an optional in-app purchase. Happy to answer anything about the code.

https://apps.apple.com/app/id6772564252

3 Upvotes

1 comment sorted by

1

u/Kind-Survey925 16h ago

Where does it persist the countdowns? Installing the app on a new phone would load/sync them?