A native iPhone & iPad app for reading, learning and reciting classic Chinese Tang dynasty poetry. Each poem shows the original Chinese characters with Hanyu Pinyin above every character, can be read aloud in a Chinese male voice (fully offline), and comes with a short background/appreciation and a poet biography.
📲 Now available on the App Store — Tang Poems · 唐诗三百首
- 📖 Curated Tang poems — ~40 of the most famous poems from《唐诗三百首》by Li Bai, Du Fu, Wang Wei, Bai Juyi and more.
- 🔤 Per-character Hanyu Pinyin — tone-marked pinyin rendered above each Chinese character for easy reading and pronunciation.
- 🔊 Offline read-aloud (Chinese male voice) — tap 朗读 to hear the whole poem narrated via the built-in
AVSpeechSynthesizer(zh-CN), no network required. - 📝 Background & poet bio — every poem includes a concise 诗词赏析 (appreciation) and 诗人简介 (poet biography).
- 🔎 Search — by poem title, poet name, keyword, or pinyin (tone-insensitive).
- 🎚️ Filter by poet — quickly browse all poems from a single poet.
- 🍏 Universal & adaptive —
NavigationSplitViewmaster–detail on iPad, navigation stack on iPhone. - 🤍 Clean white theme — a calm, classic reading experience with a cinnabar-red (印章红) accent.
| Area | Choice |
|---|---|
| Language | Swift 5 |
| UI | SwiftUI (iOS 17+) |
| Speech | AVSpeechSynthesizer (offline, zh-CN male voice) |
| Layout | NavigationSplitView, custom FlowLayout for pinyin alignment |
| Data | Bundled poems.json (generated with pypinyin) |
| Project gen | XcodeGen (project.yml) |
TangPoems/
TangPoemsApp.swift # App entry, white nav/tab appearance
MainTabView.swift # Tabs: 唐诗 / 反馈 / 关于
PoemsView.swift # Browse + search (NavigationSplitView)
PoemDetailView.swift # Characters + pinyin, read-aloud, background, poet bio
FlowLayout.swift # Wrapping layout for per-character pinyin columns
TTSManager.swift # Offline Chinese male-voice TTS
PoemStore.swift # Loads poems.json, search/filter
Models.swift # Poem / line / char-pinyin models
Theme.swift # Brand tokens (white theme, cinnabar accent)
FeedbackView.swift # WhatsApp feedback form
AboutView.swift # App / developer / data-source / version
Resources/poems.json # Curated poems with pinyin, background, poet bios
data/generate_poems.py # Regenerates poems.json (pypinyin)
project.yml # XcodeGen spec
brew install xcodegen # if not installed
xcodegen generate # produces TangPoems.xcodeproj
open TangPoems.xcodeproj # build & run on an iPhone or iPad simulatorTo regenerate the poem data (requires pip install pypinyin):
cd data && python3 generate_poems.pyPoem texts are classic public-domain works, referenced from 维基文库 ·《唐詩三百首》.
Developed by Tertiary Infotech Academy Pte Ltd — tertiaryinfotech.com.

