A complete gdb to lldb command map.
- Print object
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
- p - Print primitive type
| import Foundation | |
| // Important: Ensure a DEBUG flag is set under OTHER SWIFT FLAGS (Debug environment only) | |
| enum AppConfig: String { | |
| case debug = "Debug" | |
| case testFlight = "TestFlight" | |
| case appStore = "Appstore" |
| import Foundation | |
| import RxSwift | |
| public class RxStore: StoreSubscriber { | |
| private var stateObservable:Observable<AppState> { | |
| return subject.asObserver() | |
| .shareReplay(1) | |
| } | |
| private var subject = PublishSubject<AppState>() |
| struct Style<View: UIView> { | |
| private let style: (View) -> Void | |
| init(style: @escaping (View) -> Void) { | |
| self.style = style | |
| } | |
| func apply(to view: View) { | |
| style(view) | |
| } |
| import UIKit | |
| private let reuseIdentifier = "Cell" | |
| class CollectionViewController: UICollectionViewController { | |
| /* Custom scrollView for paging */ | |
| let pagingScrollView = UIScrollView() | |
| /* Return item size */ |
| // This example shows how higher-kinded types can be emulated in Swift today. | |
| // It acheives correct typing at the cost of some boilerplate, manual lifting and an existential representation. | |
| // The technique below was directly inspired by the paper Lightweight Higher-Kinded Polymorphism | |
| // by Jeremy Yallop and Leo White found at http://ocamllabs.io/higher/lightweight-higher-kinded-polymorphism.pdf | |
| /// `ConstructorTag` represents a type constructor. | |
| /// `Argument` represents an argument to the type constructor. | |
| struct Apply<ConstructorTag, Argument> { | |
| /// An existential containing a value of `Constructor<Argument>` | |
| /// Where `Constructor` is the type constructor represented by `ConstructorTag` |
| // | |
| // EmitWhile.swift | |
| // | |
| // Created by Daniel Tartaglia on 09/06/2018. | |
| // Copyright © 2018 Daniel Tartaglia. MIT License. | |
| // | |
| import RxSwift | |
| /** |
A complete gdb to lldb command map.
(lldb) po responseObject
(lldb) po [responseObject objectForKey@"state"]
| import UIKit | |
| import CoreData | |
| import Playgrounds | |
| import RxSwift | |
| import RxCocoa | |
| @objc(ProductEntity) | |
| final class ProductEntity: NSManagedObject { | |
| @NSManaged public var uuid: String? | |
| @NSManaged public var title: String? |
| public protocol OptionalType { | |
| associatedtype Wrapped | |
| var value: Wrapped? { get } | |
| } | |
| extension Optional: OptionalType { | |
| public var value: Wrapped? { | |
| return self | |
| } | |
| } |
| // | |
| // DeallocTests.swift | |
| // | |
| // Created by Rogerio de Paula Assis on 7/14/19. | |
| // Extracted from this CCH Melbourne talk: https://www.youtube.com/watch?v=514rJ1efv84 | |
| // | |
| import XCTest | |
| class DeallocTests: XCTestCase { |