First off, I need to give a shout out to Jon Reid and Quality Coding. His blog at Quality Coding Blog it was through Jon's posts and live coding sessions where all of this code got fleshed out.
- For the Target, choose your Test Target
| 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 |
| 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)") |
First off, I need to give a shout out to Jon Reid and Quality Coding. His blog at Quality Coding Blog it was through Jon's posts and live coding sessions where all of this code got fleshed out.
| print(Unmanaged.passUnretained(self).toOpaque()) |
| 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 |