Skip to content

Instantly share code, notes, and snippets.

View mlvea's full-sized avatar
🌴
On vacation

Phanerozoic mlvea

🌴
On vacation
View GitHub Profile
@steipete
steipete / ios-xcode-device-support.sh
Last active December 12, 2023 03:36
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@mlvea
mlvea / optionals_basic.swift
Last active August 29, 2015 14:17
Optionals and Dictionary
let netWorthOfBillionaires = ["Bill Gates":78.5,"Carlos Slim Helu":71,"Warren Buffett":70.9]
let possibleNetWorth = netWorthOfBillionaires["Tim Cook"]
//Type of the possibleNetWorth is inferred to Double?
//Know what! Tim cook is not a billionair yet. His net worth is aroung $400 million
//Thats why he is not in our list. But who knows. He might becomes a billionair
if (possibleNetWorth != nil){