Kaynak/Reference: Swiftful Thinking
Building a custom data type
State management 1
State management 2
- ⚙️ ViewModel
State management 3, Custom model, Identifiable Protocol, ViewModel, ObservableObject Protocol, @Published, init(){}, @StateObject, @ObservedObject
State management 4, @EnvironmentObject, .environmentObject()
- ⚙️ AppStorage
@AppStorage()
- ⚙️ Review
We will create a fake user onboarding experience in which a user can sign up, add their name, age, gender, and then log in to our application. In this example we will focus on persisting the data with @AppStorage and making beautiful animations with the .transition modifier.
Identifiable, Equatable, Comparable, and Hashable Protocols
- ⚙️ Core Data
Creating a Core Data model, Adding entities, Setting the properties of these entities
- ⚙️ Core Data 2
Setting up a Core Data stack, Initialize a Persistent Container
- ⚙️ Core Data 3
Inject the managed object context
- ⚙️ Core Data 4
Data manipulations in Core Data
- ⚙️ Core Data 5
Entity relationships, predicates, and delete rules in Core Data
DispatchQueue, DispatchQueue.main.async { }, .global(qos:), .async, Thread.isMainThread, Thread.current, .background, .userInteractive, .userInitiated
How ARC works
Strong reference cycles between class instances and Resolving strong reference cycles between class instances
weak, weak self
- ⚙️ Typealias
typealias name = existing type, typealias CompletionHandler = (Int)->(String)
@escaping, [weak self], self?
JSON, Why Is JSON Used?, Modeling relevant JSON data, JSONSerialization, .jsonObject(with:options:), .data(withJSONObject:options:)
JSON, Why Is JSON Used?, Modeling relevant JSON data, Codable (type alias) Decodable and Encodable protocols, protocol Decoder, protocol Encoder, JSONDecoder(), JSONEncoder(), container.decode(:from:), container.encode(:), CodingKeys, decoder.container(keyedBy:), encoder.container(keyedBy:)
Modeling relevant JSON data, Codable, JSONDecoder(), JSONEncoder(), container.decode(:from:), container.encode(:)
Modeling relevant JSON data, Codable, @Published, URL(), URLRequest(), JSONDecoder(), URLSession, asyn/await, .task {}
Downloading JSON from an API using completionHandler and @escaping
URL, URLSession, URLSession.shared, URLSessionDataTask, Handling Data, Responses and Errors, URLSessionUploadTask, URLSessionDownloadTask, Managing Sessions, Task Lifecycle Management, Background Sessions, Handling Background Events, Handling Cookies and Sessions, Error Handling and Debugging, Concurrency and DispatchQueues, Grand Central Dispatch Integration, Authentication and Security, URLSessionConfiguration
URLSession, URLSession.shared, URLSession.shared.dataTaskPublisher(for:), .receive(on:options:), .tryMap(), .decode(type:decoder:), .replaceError(with:), .sink(receiveValue:), .store(in: &self.cancellables):
Timer, .publish(), .autoconnect(), onReceive(publisher:perform:)
Publishers and Subscribers, Timer, .publish(), .autoconnect(), .sink{}, .debounce(for:scheduler:options:), .map(:), .combineLatest(:), .store(in: &self.cancellables):, AnyCancellable
- ⚙️ File Manager
Managing data and images via File Manager
Caching images in the assets folder
Downloading and saving images using Codable, Combine Framework, Background threads, FileManager and NSCache