Skip to content

Instantly share code, notes, and snippets.

View PaulSolt's full-sized avatar

Paul Solt PaulSolt

View GitHub Profile
@steipete
steipete / xcode-agent-manual.md
Created June 26, 2025 11:56
Xcode instructions as alternative to XcodeBuildMCP, using built-in cli commands, axe and the new xcsentinel

Xcode Agent Command-Line Manual

This document is the complete guide for interacting with Xcode projects, simulators, and devices using a powerful, native command-line toolchain. This manual supersedes any MCP-based approach by providing direct access to a more robust and efficient set of tools.

The primary tools are xcsentinel for build orchestration and log management, and axe for UI automation.

1. Installation

These tools must be installed on the system. Use Homebrew for installation.

@froggomad
froggomad / NetworkService.swift
Last active June 24, 2020 16:22
Network Helper Class
import Foundation
protocol NetworkLoader {
func loadData(using request: URLRequest, with completion: @escaping (Data?, HTTPURLResponse?, Error?) -> Void)
}
extension URLSession: NetworkLoader {
/// Asyncronously load data using a URL Request
/// - Parameters:
/// - request: an unwrapped URLRequest
@stinger
stinger / CombineFetcher.swift
Last active January 28, 2023 18:07
Combine - fetching data using URLSession publishers
import Foundation
import Combine
enum APIError: Error, LocalizedError {
case unknown, apiError(reason: String)
var errorDescription: String? {
switch self {
case .unknown:
return "Unknown error"
@endy-s
endy-s / String.swift
Last active October 21, 2022 04:03
Compare two String Versions
extension String {
func getRawVersionString() -> String? {
return self.removePrefix("v")
.split(separator: "-")
.first?.toString()
}
// Modified from the DragonCherry extension - https://github.com/DragonCherry/VersionCompare
private func compare(toVersion targetVersion: String) -> ComparisonResult {
let versionDelimiter = "."
@joshavant
joshavant / UIView+Utility.swift
Created November 17, 2018 07:40
Ambiguity Treadmill
extension UIView {
@objc func exerciseAmbiguityInLayoutRepeatedly() {
if self.hasAmbiguousLayout {
Timer.scheduledTimer(timeInterval: 0.5,
target: self,
selector: #selector(UIView.exerciseAmbiguityInLayout),
userInfo: nil,
repeats: true)
}
}
@danieleggert
danieleggert / iOS_sysdiagnose.md
Created February 6, 2018 14:14
How to trigger a sysdiagnose on iOS

How To sysdiagnose on iOS:

  1. Hold volume up + volume down + power for 250 milliseconds.
  2. Wait (up to 5 minutes)
  3. Settings.app > Privacy > Analytics > Analytics Data
  4. Select the "sysdiagnose_" file and share via AirDrop to a Mac.
@fletcher
fletcher / default.keybinding
Last active August 28, 2019 16:26
MultiMarkdown Composer 4 Default Key Binding File
[{
"key": "P",
"action": "togglePreview:",
"modifiers": ["cmd", "ctrl"]
}, {
"key": "I",
"action": "toggleInfo:",
"modifiers": ["cmd", "shift"]
}, {
"key": "T",
@JohnSundell
JohnSundell / OnboardingManager.swift
Last active May 21, 2020 08:19
An example of using #function for user defaults properties, and a test that guards against property name changes
import UIKit
class OnboardingManager {
private let userDefaults: UserDefaults
init(userDefaults: UserDefaults = .standard) {
self.userDefaults = userDefaults
}
func presentOnboardingControllerIfNeeded(in viewController: UIViewController) {