This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os.log | |
import Foundation | |
public struct Log { | |
static let log = OSLog(subsystem: "domain", category: "App") | |
static public func debug(_ message: Any) { | |
os_log("⚪️ DEBUG - %@", log: log, type: .debug, "\(message)") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Put this file in /usr/local/bin and then run chmod +x on it to make it executable | |
command=$1 | |
shift | |
case $command in | |
"init" ) | |
swift package init "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uncomment the next line to define a global platform for your project | |
# platform :ios, '9.0' | |
target '%TargetName%' do | |
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks | |
use_frameworks! | |
# Pods for %TargetName% | |
# pod 'FBSDKCoreKit' | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ReactiveSwift | |
import Result | |
// MARK: - Task | |
final class Task<V, E: Error> { | |
typealias ProcessingHandler = (@escaping (Result<V, E>) -> Void, DisposableBag) -> Void | |
enum State { | |
case idle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
func findFiles(rootPath: String, suffix: String, ignoreDirs: Bool = true) -> [String]? { | |
var result = [String]() | |
let fileManager = FileManager.default | |
if let paths = fileManager.subpaths(atPath: rootPath) { | |
let swiftPaths = paths.filter { $0.hasSuffix(suffix) } | |
for path in swiftPaths { | |
var isDir : ObjCBool = false | |
let fullPath = (rootPath as NSString).appendingPathComponent(path) |
OlderNewer