Skip to content

Instantly share code, notes, and snippets.

@scriptingosx
scriptingosx / ContentView.swift
Last active January 22, 2026 06:47
Sample mini SwiftUI ContentView which gets to values from AppStorage/UserDefaults/CFPreferences
import SwiftUI
struct ContentView: View {
@AppStorage("greeting") private var greeting: String = ""
@AppStorage("name") private var name: String = ""
var body: some View {
VStack {
TextField("Greeting", text: $greeting)
TextField("Name", text: $name)