The CodeKits notebook
Ideas into working code.
Practical tutorials, project walkthroughs and development notes. Explore the code, understand the structure, and build something of your own.
8 articles · Newest first
Swift
Add photo and file attachments to SwiftUI
Separate photo and document selection from upload, stage private files safely, and show loading, cancellation and unsupported-format failures.
· 4 min read
Swift
Build an iOS terminal toolbar with SwiftTerm
Add Esc, Tab, Ctrl and arrow controls to a SwiftTerm terminal without confusing user input with output or hard-coding every cursor mode.
· 4 min read
Swift
Connect a SwiftUI screen to a Node.js API
Load a small JSON API in SwiftUI with explicit loading, empty and failure states, response validation, cancellation and a retry action.
· 4 min read
Swift
Reconnect iOS SSH after backgrounding
Model SSH reconnection explicitly, reject stale connection results, and distinguish a surviving tmux session from an active iOS network connection.
· 4 min read
Swift
Share contacts with QR codes in SwiftUI
Generate a bounded contact QR payload, validate scanned data, and require confirmation before adding a contact or contacting a server.
· 4 min read
Swift
Store iOS credentials in Keychain with Swift
Save, read, replace and delete a credential with a small Swift Keychain wrapper, explicit accessibility and useful handling of OSStatus failures.
· 4 min read
Swift
Upload large iOS files with progress and cancellation
Upload from a staged file, report transport progress honestly, handle cancellation, and understand the extra lifecycle work of background URLSession.
· 4 min read
Swift
Verify SSH host fingerprints in an iOS client
Separate first-use trust from known-host verification, compare the correct SSH key bytes, and stop on changed keys before authentication continues.
· 4 min read
