项目作者: bratwursted

项目描述 :
The Star Wars Reader for iOS
高级语言: Swift
项目地址: git://github.com/bratwursted/alta-ios.git
创建时间: 2020-01-11T00:41:33Z
项目社区:https://github.com/bratwursted/alta-ios

开源协议:

下载


Star Wars Reader

The Star Wars Reader is a demo app/learning exercise that uses SwiftUI and Combine to browse a dataset of Star Wars information.

Architectural Highlights

  • The networking components of the app use Combine to make requests for network resources.
    • The main data fetcher utilizes the new dataTaskPublisher method that returns a publisher to deliver results of the network request rather than a callback closure (i.e., dataTask(with:completionHandler:)).
    • Additional methods are chained to this publisher to return publishers that deliver data structures parsed from this data.
  • The interface is built entirely using SwiftUI, which lends itself nicely to MVVM patterns and mock data sources for testing while you are developing.

  • Navigation between views is handled by a FlowCoordinator, which has the responsibility for initializing new views to be used as NavigationLink destinations. These initializers are injected into the view models via closures.

  • The data for the app is read from SWAPI, the Star Wars API, using GraphQL via the SWAPI GraphQL Wrapper.

Installation

Clone the repo, open the project in Xcode, and run! May the Force be with you.

Screenshot

sw reader screenshot

Credits