Skip to Content
Die Kartei/Docs

The Android port

Keeping as much of Die Kartei in Swift as we can, on Android.

The goal is the same app on Android without a second codebase: the iOS app's own Swift where it can travel, and SwiftUI for the screens.

One shared block of code in the middle sends the same cards to two phones

How it fits together

Two layers, both Swift:

  • DieKarteiCore is a Swift package of the app's portable files. Its sources are symlinks into german-ai-flashcards/, so the iOS app keeps compiling them in place and nothing is copied. scripts/core_sync.py finds them: every file that needs only Foundation, cross-compiled for Android with the Swift SDK for Android.
  • DieKarteiAndroid is a Skip Fuse app. Skip compiles Swift natively for Android and turns SwiftUI into Jetpack Compose, so the Android screens are SwiftUI too. A small transpiled module, GermanVoice, reaches Android APIs Swift can't (text to speech).

To bring more of the app across, a type that sits in a SwiftUI or SwiftData file moves to its own Foundation-only file, with no change on iOS. The script then picks up everything that depended on it.

What runs on Android today

TabWhatShared from iOS
KartenThe Goethe deck with spaced repetition, four rating buttons, saved on deviceSM-2 scheduler, word lists
WortschatzThe A1–B1 lists, searchableWord lists
GrammatikKasus lessons, der/die/das, Präpositionen, four gap-fill sets, PerfektLessons, rules, exercises
HörenZahlen-Diktat for every number kind, in Android's German voiceNumber engine and answer check
SpieleGalgenmännchen, WortsucheGame engines

About 80 of the app's Swift files build for Android so far.

What stays Apple-only

AppleOn Android
SwiftDataA store shaped like the sync records (see Sync)
iCloud SyncMerge engine is shared; Google Drive as the transport
MLX (the tutor model)Not yet; a GGUF build of the tutor models with llama.cpp is the likely path
SpeechAndroid's text to speech, through GermanVoice
PencilKitNot yet; a Compose drawing surface later

What's next

  • Kasus drills and stories. Their value types live in KasusService.swift, a SwiftData file. Moving them out unlocks most of Services/Grammar/Kasus.
  • Matching and the reflexive drills, the same way.
  • Sync, in three steps: Sync on Android.

On this page