Swift Package

Read a Bible translation in SwiftUI, without writing the plumbing twice.

BibleKit bundles the models, an XML parser, an observable view model, and a ready-to-use reading screen — one place for Bible-reading code shared across apps, instead of copy-pasted into each one.

What's inside

  • BibleModels BibleBook, BibleChapter, BibleVerse, BibleTestament
  • BibleParser Streaming XMLParser-based parser
  • BibleReaderModel An @Observable load-state view model
  • BibleReaderView Book → chapter → verses reading screen

Data source

The text lives in a git submodule of Holy-Bible-XML-Format, a dataset covering hundreds of translations across most written languages. BibleKit bundles the Afrikaans 2020 translation as a package resource via Bundle.module, so consuming apps get a working Bible out of the box, with no extra setup.

Usage

Add BibleKit as a Swift package dependency, then drop in the reading screen:

import BibleKit

struct ContentView: View {
    var body: some View {
        BibleReaderView()
    }
}

Or use the pieces directly — BibleParser.parseBundled() returns the parsed translation and books, and BibleReaderModel wraps that in an observable load state for your own UI.

Clone with submodules

git clone --recurse-submodules https://github.com/PJKloppers/BibleKit.git

Already cloned? git submodule update --init --recursive

Built to be shared

BibleReader

A standalone Bible reading app for iOS, iPadOS, macOS, and visionOS.

Delta

A habit and goal tracking app with a Bible tab.