View SKErrorThrowsAndCatch.swift
import StoreKit
//extension SKError: Error { } // Uncomment this line to make it throwable
func throwError() throws {
throw SKError.unknown // Can not be thrown. Thrown error code type 'SKError.Code' does not conform to 'Error'
do {
try throwError()
View wwdc-trip-preparations.markdown

This mini guide has been moved to here.

View UIView+isPossiblyVisible.swift
extension UIView {
func isPossiblyVisible() -> Bool {
guard isHidden == false,
alpha > 0,
bounds != .zero,
let window = window, // In a window's view hierarchy
window.isKeyWindow, // Does not consider cases covered by another transparent window
window.hitTest(convert(center, to: nil), with: nil) != self
else { return false }
View detect-string-language.swift
//: Playground - noun: a place where people can play
// The result is not guaranteed to be accurate. Typically, the function requires 200-400 characters to reliably guess the language of a string.
// Reference: [CFStringTokenizerCopyBestStringLanguage(_:_:)](
import Foundation
extension String {
func guessLanguage() -> String {
## chmod +x this.file
# install xcode command tool
xcode-select --install
# check
xcode-select -p
# install brew