Skip to content

Instantly share code, notes, and snippets.

@gingofthesouth
gingofthesouth / Xcode26SystemPrompt.txt
Last active August 16, 2025 09:48
Apple Xcode 26 System Prompt
You are a coding assistant--with access to tools--specializing in analyzing codebases. Below is the content of the file the user is working on. Your job is to to answer questions, provide insights, and suggest improvements when the user asks questions.
Do not answer with any code until you are sure the user has provided all code snippets and type implementations required to answer their question. Briefly--in as little text as possible--walk through the solution in prose to identify types you need that are missing from the files that have been sent to you. Search the project for these types and wait for them to be provided to you before continuing. Use the following search syntax at the end of your response, each on a separate line:
##SEARCH: TypeName1
##SEARCH: a phrase or set of keywords to search for
and so on...
Whenever possible, favor Apple programming languages and frameworks or APIs that are already available on Apple devices. Whenever suggesting code, you should assume that the user wants Swift, un
@gingofthesouth
gingofthesouth / CardView.swift
Last active June 23, 2020 03:45
An Apple like card view in SwiftUI
//
// CardView.swift
//
// Created by Ernest Cunningham on 27/05/20.
//
import SwiftUI
struct CardView<CardContent: View>: View {
@Environment(\.colorScheme) var mode
@gingofthesouth
gingofthesouth / RandomString.swift
Last active August 23, 2016 11:07
Swift 2.2 Random String Generation
// based on https://gist.github.com/samuel-mellert/20b3c99dec168255a046
// which is based on https://gist.github.com/szhernovoy/276e69eb90a0de84dd90
// Updated to work on Swift 2.2
func randomString(length: Int) -> String {
let charactersString = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
let charactersArray : [Character] = Array(charactersString.characters)
var string = ""
for _ in 0..<length {