SwiftUI + Combined
What is SwiftUICombined?
It’s SwiftUIReference meets Combine.
SwiftUIReference is GiphyTags meets SwiftUI.
This is a SwiftUI reference app based upon GiphyTags and then updated with Combine.
It is written in Swift 5 and Xcode Version 11.4.1 (11E503a)
This app queries the GIPHY website via its URL API interface, and uses the tags returned to search deeper and deeper.
(This isn’t necessarily a good thing!)
To use the app you will need to get an API key from https://developers.giphy.com/dashboard/?create=true.
The app can open the Giphy website and take you there.
Dropped Alamofire
and RxSwift
.
Networking uses URLSession.dataTaskPublisher
and uses AnyPublisher<>
for most networking objects.
The SolitaryViewModel is now an ObservableObject
for slightly more efficient integration with SwiftUI.
Alert
views sheet
sheet
UIViewRepresentable
wrapper around UIActivityIndicatorView
UIViewRepresentable
wrapper around UIImageView
Combine
ObservableObject
and ObservedObject
Generic Data
extensions for both Result<>
and AnyPublisher<>
func decodeData<T: Decodable>() *> Result<T, ReferenceError>
func decodeData<T: Decodable>() *> AnyPublisher<T, ReferenceError>
HTTPURLResponse
extension
HTTPURLResponse.validateData(Data, URLResponse, ...) *> AnyPublisher<Data, ReferenceError>
NetworkService.getDataPublisher() *> AnyPublisher<Data, ReferenceError>
URLSession.dataTaskPublisher