Skip to content

Instantly share code, notes, and snippets.

View loganblevins's full-sized avatar

Logan Blevins loganblevins

View GitHub Profile
@funmia
funmia / design-patterns.md
Created January 24, 2020 12:06
Design patterns - rayweinderlich

Design patterns - rayweinderlich

Types of design patterns

  1. Structural patterns describe how objects are composed to form larger subsystems. Examples of structural patterns are:
  1. Behavioral patterns describe how objects communicate with each other.
@cenkbilgen
cenkbilgen / URLSessionDownloadPublisher.swift
Created February 26, 2020 20:52
An extension to URLSession to create a Combine Publisher for URLDownloadTask
import Foundation
import Combine
fileprivate class CancellableStore {
static let shared = CancellableStore()
var cancellables = Set<AnyCancellable>()
}
public enum DownloadOutput {
case complete(Data)
@egzonpllana
egzonpllana / IAPService.swift
Last active May 19, 2021 12:25
StoreKit iOS Swift InAppPurchase Process SKPayment
// Created on 7/9/2020.
//
// Developed by: Kilo Loco
// Improved by Egzon Pllana
import Foundation
import StoreKit
protocol IAPServiceDelegate: class {
@funmia
funmia / ios-interview-resources.md
Last active July 24, 2025 13:34
General iOS, CS questions and interview prep resources.
@sindresorhus
sindresorhus / PHImageManager-requestImage-async.swift
Created November 3, 2021 05:46
How to use `PHImageManager#requestImage` with async/await in Swift.
import Photos
struct UnexpectedNilError: Error {}
extension PHImageManager {
func requestImage(
for asset: PHAsset,
targetSize: CGSize,
contentMode: PHImageContentMode,
options: PHImageRequestOptions?