Skip to content

Instantly share code, notes, and snippets.

View MadeByDouglas's full-sized avatar

Douglas Hewitt MadeByDouglas

View GitHub Profile
@florentmorin
florentmorin / ModelIdentifier.swift
Last active May 1, 2025 15:36
Returns device model identifier for visionOS (ie. `RealityDevice14,1` for Apple Vision Pro)
func visionOSModelIdentifier() -> String {
if let identifier = ProcessInfo().environment["SIMULATOR_MODEL_IDENTIFIER"] {
return identifier
} else {
var systemInfo = utsname()
uname(&systemInfo)
let machine = Mirror(reflecting: systemInfo.machine)
return machine.children
.compactMap({ $0.value as? Int8 })
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 3, 2025 05:28
Swift Concurrency Manifesto
@coryalder
coryalder / AmazonProduct.swift
Last active October 23, 2019 08:47
Amazon Product Advertising API + Alamofire
//
// AmazonProduct.swift
// Requires SHXMLParser for parsing Amazon's XML responses (https://github.com/simhanature/SHXMLParser)
//
// Created by Cory Alder on 2015-01-11.
// Copyright (c) 2015 Davander Mobile Corporation. All rights reserved.
//
// partly inspired by RWMAmazonProductAdvertisingManager
import Alamofire
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 9, 2025 12:04
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S