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 | |
| import Combine | |
| // The Request Method | |
| enum HTTPMethod: String { | |
| case get = "GET" | |
| case post = "POST" | |
| case put = "PUT" | |
| case delete = "DELETE" | |
| } |
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 MyTestClass: NSSecureCoding { | |
| var name: String = "" | |
| var last_name: String = "" | |
| // Make sure you add this property | |
| static var supportsSecureCoding: Bool = true | |
| required init?(coder: NSCoder) { | |
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 AnimalGenerator: Generator, ObservableObject { | |
| @Published private(set) var name: String = "" | |
| var namePublished: Published<String> { _name } | |
| var namePublisher: Published<String>.Publisher { $name } | |
| let animals = ["Cat", "Dog", "Crow", "Horse", "Iguana", "Cow", "Racoon"] | |
| init() { | |
| generate() |