APICallSwiftUICombine

This is an example Usage of API Call using Combine Framework in SwiftUI to showcase my understanding of the related topic. The View Model file contains 2 functions, one uses the regular URLSession JSON API concept, another uses the Swift Combine URLSession to make API Call and fetch data.

URLSession API

URLSession API is part of the foundation framework.

Frameworks

Combine; SwiftUI.

API Call

https://jsonplaceholder.typicode.com/users

Demos

1. Succesfully fetch data

2. Loading Data ProgressView

3. Failure Alert

GitHub

View Github