Skip to content

bratwursted/alta-ios

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages