Skip to content

Instantly share code, notes, and snippets.

@patriknyblad
patriknyblad / xcrun_simctl_cheatsheet.md
Last active April 1, 2025 10:07
iOS Simulator Terminal Commands `$ xcrun simctl`

Managing iOS Simulators

List all simulators created

$ xcrun simctl list --json

Delete old and unavailable simulators

$ xcrun simctl delete unavailable
@txaiwieser
txaiwieser / UIBezierPath+Polygons.swift
Created May 11, 2015 19:20
UIBezierPath+Polygons.swift - UIBezierPath Swift extension for easy creation of polygon paths!
//
// UIBezierPath+Polygons.swift
//
//
// Created by Txai Wieser on 11/05/15.
// Copyright (c) 2015 TDW. All rights reserved.
// Based on: https://github.com/ZevEisenberg/ZEPolygon, thanks man!
import UIKit
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@ehuynh
ehuynh / gist:2396566
Created April 16, 2012 05:48
iOS Singleton
static MyObject *singleton = nil;
+(MyObject *) sharedInstance {
NSLog (@"sharedInstance called.");
if (nil != singleton) return singleton;
static dispatch_once_t predicate;
dispatch_once(&predicate, ^{
singleton = [[MyObject alloc] init];