* Add icons variants for required resolutions * Optimize PNG's size Even without centralizing the resources, we can already save a few bytes. The total size was reduced by 75%. * Replace iTunes variants by a very compact transparent image This will never hit the AppStore anyway. * Replace images by lossless optimized variants The previous optimization pass was lossy. This PR replace images with an optimized lossless variant of the original. * Restore original iPhone icons I don't know why images that were supposedly losslessly optimized by ImageOptim were less vibrant than the original. I restored them by their original variants. Upscaled variants are less vibrant though, but I guess it's acceptable without access to the original vector source. * Fix color space ImageOptim seems to change the color space when it optimizes files losslessly. I've created new variants with Pixelmator Pro and exported as web-compressed from there instead.
Tic-Tac-Toe
This example demonstrates how to build a full, moderately complex application in the Composable Architecture. It is based off the Tic-Tac-Toe examples used to demonstrate RIBs from Uber (see here) and Workflows from Square (see here).
It shows many real-world use cases and best practices that we encounter when building applications:
-
Login flow and two-factor screens.
-
Multistep navigation flows, from login to new game screen to game screen.
-
Comprehensive test suite for every feature, including integration tests of many features working in unison, and end-to-end testing of side effects.
-
Fully controlled side effects. Every feature is provided with all the dependencies it needs to do its work, which makes testing very easy.
-
Highly modularized: every feature is isolated into its own module with minimal dependencies between them, allowing us to compile and run features in isolation without building the entire application.
-
SwiftUI and UIKit applications are implemented, and both share the same core logic. This shows it's possible to create UIKit applications with the Composable Architecture just as easily as it is to create SwiftUI applications.
-
The core logic of the application is put into modules named like
*Core, and they are kept separate from modules containing UI, which is what allows us to share code across multiple platforms (SwiftUI and UIKit), but could also allow us to share code across iOS, macOS, watchOS and tvOS apps. -
Navigation is completely driven off of state. To see this, try opening the SwiftUI game, do a few things in the game, then close the modal and open the UIKit version to see that state is fully restored to where you left off.