Skip to content

Instantly share code, notes, and snippets.

View rjstelling's full-sized avatar
🕶️
Encrypting Bits

Richard Stelling rjstelling

🕶️
Encrypting Bits
View GitHub Profile
@rjstelling
rjstelling / UniformTypeIdentifierExtensions.swift
Last active March 8, 2024 18:21
A couple of extensions to make working with UTI in Swift less painful.
import Foundation
// Typesafe UTI, system APIs are all stringly typed 🙄
public struct UTI: CustomDebugStringConvertible, CustomStringConvertible {
public enum Error: Swift.Error {
case invalidCharachters
}
private let rawUTI: String
//
// SemanticVersioning.swift
//
//
// Created by Richard Stelling on 28/05/2020.
//
// The MIT License (MIT)
//
// Copyright (c) 2016-17 Richard Stelling (http://twitter.com/rjstelling)
@rjstelling
rjstelling / BorderButton.swift
Created October 27, 2020 11:07
Accessibility Border Button
import UIKit
class BorderButton: UIButton {
private class BorderLayer: CAShapeLayer {
fileprivate var _borderWidth: CGFloat { UIAccessibility.isBoldTextEnabled ? 2.0 : 1.0 }
fileprivate var _cornerRadius: CGFloat = 4.0
override var lineWidth: CGFloat { get { _borderWidth } set { } }
override var fillColor: CGColor? { get { UIColor.clear.cgColor } set { } }
@rjstelling
rjstelling / Lazy Lock Down Curriculum.markdown
Last active January 6, 2021 01:58
Lazy Lock Down Curriculum - enjoyable but educational things for students to do during lock down. Entries should be self contained videos or activities that can supplement a students education during lock down and home schooling. Any content posted must be free (commercial videos or items that require purchase will be removed). Please make sure …

Lazy Lock Down Curriculum

Rules

  1. No adverts
  2. Entries should be age approprate (5-16)
  3. Be kind

Science

Lockdown Embryology with Prof. Alice Roberts

{
"macOS Dynamic System Colors": {
"Alternate selected control text color": {
"Use for": "The text on a selected surface in a list or table.",
"AppKit API": "alternateSelectedControlTextColor"
},
"Alternating content background colors": {
"Use for": "The backgrounds of alternating rows or columns in a list, table, or collection view.",
"AppKit API": "alternatingContentBackgroundColors"
},

How to Create and Use Multiple Apple IDs for iOS Simulator Testing

Creating multiple Apple IDs for testing your app in the iOS Simulator can help isolate user experiences and troubleshoot issues effectively. Follow this easy guide to set up and successfully use multiple Apple IDs.

Step 1: Prepare Unique Apple IDs

Each Apple ID you create must have:

  • A unique email address (you cannot reuse emails across Apple IDs).
  • Access to a phone number for Two-Factor Authentication (2FA).

Fixing Linker Errors in Xcode (___llvm_profile_runtime Missing Symbol)

Encountering a linker error in Xcode can be frustrating, especially when dealing with third-party Swift packages. One common error looks like this:

Undefined symbols for architecture arm64:
  "___llvm_profile_runtime", referenced from:
      ___llvm_profile_runtime_user in PocketSVG.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)