From SwiftTube Smart Debugging Talk 2018 and Advanced Debugging Techniques
brew install chisel
xcrun simctl --set previews delete all |
ACTION=build | |
AD_HOC_CODE_SIGNING_ALLOWED=NO | |
ALTERNATE_GROUP=staff | |
ALTERNATE_MODE=u+w,go-w,a+rX | |
ALTERNATE_OWNER=brent | |
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=NO | |
ALWAYS_SEARCH_USER_PATHS=NO | |
ALWAYS_USE_SEPARATE_HEADERMAPS=NO | |
APPLE_INTERNAL_DEVELOPER_DIR=/AppleInternal/Developer | |
APPLE_INTERNAL_DIR=/AppleInternal |
print(Unmanaged.passUnretained(self).toOpaque()) |
Alamofire.request(urlString).responseJSON { response in | |
guard case let .failure(error) = response.result else { return } | |
if let error = error as? AFError { | |
switch error { | |
case .invalidURL(let url): | |
print("Invalid URL: \(url) - \(error.localizedDescription)") | |
case .parameterEncodingFailed(let reason): | |
print("Parameter encoding failed: \(error.localizedDescription)") | |
print("Failure Reason: \(reason)") |
extension View { | |
var previewedInAllColorSchemes: some View { | |
ForEach(ColorScheme.allCases, id: \.self, content: preferredColorScheme) | |
} | |
} |
From SwiftTube Smart Debugging Talk 2018 and Advanced Debugging Techniques
brew install chisel
AnyHashable
and AnySequence
, and all they do is act as shells that forward on their operations to whatever they contain, without revealing what the contents are to anything externally.// | |
// KeyboardAwareModifier.swift | |
// KeyboardTest | |
// | |
import SwiftUI | |
import Combine | |
struct KeyboardAwareModifier: ViewModifier { | |
@State private var keyboardHeight: CGFloat = 0 |
#!/bin/bash | |
project_name="CleanLocalizableExample" | |
development_file="./$project_name/en.lproj/Localizable.strings" | |
es_duplicates=9 | |
es_match=8 | |
es_not_included=7 | |
sort_and_find_duplicates() { |