List of all the images in /Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SFSymbols.framework/CoreGlyphsPrivate.bundle/Assets.car
NSBundle *const sfSymbolsBundle = [SFSCoreGlyphsBundle private];
_UIAssetManager *const assetManager = [_UIAssetManager assetManagerForBundle:sfSymbolsBundle];
UIImage *const image = [assetManager imageNamed:@"apple.breathe"];
This file contains 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
enum QueryPredicate { | |
case isEqualTo(_ field: String, _ value: Any) | |
case isNotEqualTo(_ field: String, _ value: Any) | |
case isIn(_ field: String, _ values: [Any]) | |
case isNotIn(_ field: String, _ values: [Any]) | |
case arrayContains(_ field: String, _ value: Any) | |
case arrayContainsAny(_ field: String, _ values: [Any]) |
This file contains 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 SwiftUI | |
import Combine | |
public struct ChangeObserver<V: Equatable>: ViewModifier { | |
public init(newValue: V, action: @escaping (V) -> Void) { | |
self.newValue = newValue | |
self.newAction = action | |
} | |
private typealias Action = (V) -> Void |
This file contains 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 Banana: NSObject, NSSecureCoding { | |
let bananaName: String | |
let userInfo: [String: Any] | |
static var supportsSecureCoding: Bool = true | |
init(bananaName: String, userInfo: [String: Any]) { | |
self.bananaName = bananaName | |
self.userInfo = userInfo | |
} |
This file contains 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 Result { | |
public func `catch`(_ handler: () throws -> Success) -> Result<Success, Error> { | |
flatMapError { _ in | |
.init { try handler() } | |
} | |
} | |
public func `catch`(_ handler: (Failure) throws -> Success) -> Result<Success, Error> { | |
flatMapError { error in | |
.init { try handler(error) } |
This file contains 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 | |
import MapKit | |
final class MapKitService { | |
// Map the Apple Category to your own category | |
private let typesToDrink: [MKPointOfInterestCategory] = [.brewery, .cafe, .winery] | |
private let typesToEat: [MKPointOfInterestCategory] = [.foodMarket, .restaurant] | |
func retrieve(from: String, completionBlock: @escaping ([Place]) -> Void) { |
This file contains 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 | |
import FirebaseFirestoreSwift | |
import FirebaseFirestore | |
import Combine | |
struct Document<Model: Codable> { | |
let ref: DocumentReference | |
let data: Model | |
static func get(collectionPath: String, id: String) -> Deferred<Future<Document<Model>, Error>> { | |
.init { () -> Future<Document<Model>, Error> in |
This file contains 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
# A Best in Class Checklist | |
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10. | |
> To use this, create a Github Issue in your own repo, and simply copy and paste this text. | |
## iOS Core Technology | |
_Things any iOS app can benefit from_ | |
- [ ] iCloud Sync | |
- [ ] Focus Filter Support |
This file contains 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
// Created by gil_birman on 11/22/19. | |
import Combine | |
import FirebaseFirestore | |
import FirebaseStorage | |
import Foundation | |
enum FirebaseCombineError: Error { | |
case encodeImageFailed | |
case nilResultError |
NewerOlder