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
// | |
// VisibilityTracker.swift | |
// Babylist | |
// | |
// Created by Aaron Smith on 8/16/24. | |
// Copyright © 2024 Babylist. All rights reserved. | |
// | |
import Foundation |
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
extension URL { | |
static var documentsDirectory:URL { | |
let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true) | |
let documentsDirectory = paths[0] | |
let path = documentsDirectory as String | |
return URL(fileURLWithPath: path, isDirectory: true) | |
} | |
} | |
class ThankyouCSVDownloader { |
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
final class NSRegex { | |
private let regex:NSRegularExpression | |
private let subject:String | |
private var matches:[NSTextCheckingResult] = [] | |
init(regex:NSRegularExpression, subject:String) { | |
self.regex = regex | |
self.subject = subject | |
matches = regex.matches(in: subject, range: NSRange(location: 0, length: subject.count)) |
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
class AppDelegate { | |
func appDidFinishLaunching() { | |
//Before the app shows root view controller, check for an override style. | |
window = UIWindow() | |
if let override = UserDefaults.standard.bool(forKey: "OverrideStyle") { | |
//There was an override set, use that otherwise use the system appearance | |
window?.overrideUserInterfaceStyle = override ? .dark : .light | |
} | |
} | |
} |
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/Foundation.h> | |
@class PipedTaskRunner; | |
@protocol PipedTaskRunnerDelegate | |
@optional | |
- (void) taskRunner:(PipedTaskRunner *) taskRunner didReadData:(NSData *) data; | |
- (void) taskRunner:(PipedTaskRunner *) taskRunner didReadDataFromStdOut:(NSData *) data; | |
- (void) taskRunner:(PipedTaskRunner *) taskRunner didReadDataFromStdErr:(NSData *) data; | |
- (void) taskRunnerTerminated:(PipedTaskRunner *) taskRunner; |
NewerOlder