Skip to content

Instantly share code, notes, and snippets.

View danielt1263's full-sized avatar

Daniel Tartaglia danielt1263

View GitHub Profile
//
// PublisherResultTransforms.swift
// rx-sandbox
//
// Created by Daniel Tartaglia on 9/19/21.
//
import Combine
/**
//
// ActivityTracker.swift
//
// Created by Daniel Tartaglia on 05 Dec 2021.
// Copyright © 2021 Daniel Tartaglia. MIT License.
//
extension Publisher {
func trackActivity(_ activityTracker: ActivityTracker) -> AnyPublisher<Output, Failure> {
activityTracker.trackActivity(of: self)
@danielt1263
danielt1263 / CycleExample.swift
Created November 19, 2021 23:00
This gist contains a couple of examples of using the new cycle functionality using my CLE architecture.
import Cause_Logic_Effect
import RxCocoa
import RxSwift
import RxSwiftExt
import UIKit
final class ViewController: UIViewController {
var tableView: UITableView!
var logoutButton: UIButton!
let disposeBag = DisposeBag()
//: A UIKit based Playground for presenting user interface
import UIKit
import RxSwift
import RxCocoa
import PlaygroundSupport
import Cause_Logic_Effect
PlaygroundPage.current.liveView = CounterViewController().configure { $0.connect() }
//
// UIPageController+Rx.swift
//
// Created by Daniel Tartaglia on 7/11/21.
// Copyright © 2021 Daniel Tartaglia. MIT License.
//
import RxCocoa
import RxSwift
import UIKit
@danielt1263
danielt1263 / TokenAcquisitionService.swift
Last active June 20, 2021 13:41
Token Acquisition Service for Combine
//
// TokenAcquisitionService.swift
// CombineSandbox
//
// Created by Daniel Tartaglia on 11/27/19.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import Foundation
import Combine
@danielt1263
danielt1263 / Store.swift
Last active November 9, 2020 18:02
A stripped down version of The Elm Architecture for Swift. Great for implementing state machines.
//
// Store.swift
//
// Created by Daniel Tartaglia on 3/11/17.
// Copyright © 2020 Daniel Tartaglia. MIT License
//
import Foundation
import RxSwift
//
// Presenter.swift
//
// Created by Daniel Tartaglia on 8/24/20.
// Copyright © 2020 Daniel Tartaglia. MIT License.
//
import UIKit
import RxSwift
@danielt1263
danielt1263 / ErrorRouter.swift
Created August 13, 2020 00:08
Gather up errors into a single Observable<Error>
//
// ErrorRouter.swift
//
// Created by Daniel Tartaglia on 5/23/20.
// Copyright © 2020 Daniel Tartaglia. MIT License.
//
import Foundation
import RxCocoa
import RxSwift
//
// ObservableEventTransforms.swift
//
// Created by Daniel Tartaglia on 9/22/18.
// Copyright © 2019 Daniel Tartaglia. MIT License.
//
import RxSwift
/**