Skip to content

Instantly share code, notes, and snippets.

View StewartLynch's full-sized avatar

Stewart Lynch StewartLynch

View GitHub Profile
@StewartLynch
StewartLynch / SyncLogView.swift
Last active October 24, 2026 19:08
Sync Log view for the 3rd video on SwiftData Updates for OS 27
//
//----------------------------------------------
// Original project: SwiftDataNew
//
// Follow me on Mastodon: https://iosdev.space/@StewartLynch
// Follow me on Threads: https://www.threads.net/@stewartlynch
// Follow me on Bluesky: https://bsky.app/profile/stewartlynch.bsky.social
// Follow me on X: https://x.com/StewartLynch
// Follow me on LinkedIn: https://linkedin.com/in/StewartLynch
// Email: slynch@createchsol.com
@StewartLynch
StewartLynch / CafeSearch.swift
Created October 20, 2026 18:34
The CafeSearch.switch view for the Part 2 video on New in SwiftData for OS27 video series
//
//----------------------------------------------
// Original project: SwiftDataNew
//
// Follow me on Mastodon: https://iosdev.space/@StewartLynch
// Follow me on Threads: https://www.threads.net/@stewartlynch
// Follow me on Bluesky: https://bsky.app/profile/stewartlynch.bsky.social
// Follow me on X: https://x.com/StewartLynch
// Follow me on LinkedIn: https://linkedin.com/in/StewartLynch
// Email: slynch@createchsol.com
@StewartLynch
StewartLynch / 8. FoldGuide.swift
Last active October 2, 2026 23:38
iPhone Duo helpers for the DuoDemo tutorial
//
//----------------------------------------------
// Original project: DuoDemo
//
// Follow me on Mastodon: https://iosdev.space/@StewartLynch
// Follow me on Threads: https://www.threads.net/@stewartlynch
// Follow me on Bluesky: https://bsky.app/profile/stewartlynch.bsky.social
// Follow me on X: https://x.com/StewartLynch
// Follow me on LinkedIn: https://linkedin.com/in/StewartLynch
// Email: slynch@createchsol.com
@StewartLynch
StewartLynch / 9. DuoLabView.swift
Last active October 2, 2026 23:38
iPhone Duo helpers for the DuoDemo tutorial
//
//----------------------------------------------
// Original project: DuoDemo
//
// Follow me on Mastodon: https://iosdev.space/@StewartLynch
// Follow me on Threads: https://www.threads.net/@stewartlynch
// Follow me on Bluesky: https://bsky.app/profile/stewartlynch.bsky.social
// Follow me on X: https://x.com/StewartLynch
// Follow me on LinkedIn: https://linkedin.com/in/StewartLynch
// Email: slynch@createchsol.com
@StewartLynch
StewartLynch / ImageRequestMode.swift
Created August 6, 2026 23:50
ImageRequestMode enum and Selector for Video on AsyncImage for iOS 27
import Foundation
enum ImageRequestMode: String, CaseIterable, Identifiable {
case httpRules
case cacheFirst
case reload
case cacheOnly
var id: Self { self }

I want to build a native macOS app named JSONFormatter using Xcode, Swift, and SwiftUI. Use the attached sketch as the visual reference for the application.

Do not write, modify, or generate any code yet.

First, inspect the existing Xcode project and then produce a staged implementation plan. The plan should be detailed enough that each stage can be completed, built, and manually verified before moving to the next stage.

App requirements:

  • Native macOS SwiftUI application
  • Two-pane layout
@StewartLynch
StewartLynch / loadStatus.txt
Created March 18, 2026 18:35
TUIKit Load Status Function
func loadStatus() {
projectName = shell("basename \"\(launchDir)\"")
branch = shell("git -C \"\(launchDir)\" rev-parse --abbrev-ref HEAD 2>/dev/null || echo '(not a git repo)'")
lastCommit = shell("git -C \"\(launchDir)\" log -1 --pretty=format:'%h %s' 2>/dev/null")
let raw = shell("git -C \"\(launchDir)\" status --porcelain 2>/dev/null | wc -l | tr -d ' '")
changedFiles = raw.isEmpty ? "–" : raw
}
@StewartLynch
StewartLynch / tuiKitShell.text
Last active March 18, 2026 18:31
TUIKit Shell Function
func shell(_ command: String) -> String {
let task = Process()
let pipe = Pipe()
task.standardOutput = pipe
task.standardError = Pipe()
task.launchPath = "/bin/bash"
task.arguments = ["-c", command]
task.environment = ProcessInfo.processInfo.environment
try? task.run()
task.waitUntilExit()
@StewartLynch
StewartLynch / AppSceneDelegate.txt
Created February 27, 2026 23:20
AppDelegate and SceneDelegate for SQLiteData Record Sharing - Gift Register app.
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
let configuration = UISceneConfiguration(
name: "Default Configuration",
sessionRole: connectingSceneSession.role
)
@StewartLynch
StewartLynch / OccasionsList.swift
Last active February 23, 2026 21:22
OccasionsList view for Gift Registry app
//
//----------------------------------------------
// Original project: GiftRegistry
//
// Follow me on Mastodon: https://iosdev.space/@StewartLynch
// Follow me on Threads: https://www.threads.net/@stewartlynch
// Follow me on Bluesky: https://bsky.app/profile/stewartlynch.bsky.social
// Follow me on X: https://x.com/StewartLynch
// Follow me on LinkedIn: https://linkedin.com/in/StewartLynch
// Email: slynch@createchsol.com