awesome iOS architecture
- Push Hero - pure Swift native macOS application to test push notifications
- PastePal - Pasteboard, note and shortcut manager
- Quick Check - smart todo manager
- Alias - App and file shortcut manager
- My other apps
โค๏ธโค๏ธ๐๐๐คโค๏ธโค๏ธ
Better ways to structure apps
let buzzWords = [
"Model", "View", "Controller", "Entity", "Router", "Clean", "Reactive",
"Presenter", "Interactor", "Megatron", "Coordinator", "Flow", "Manager"
]
let architecture = buzzWords.shuffled().takeRandom()
let acronym = architecture.makeAcronym()
Content
- MVC
- MVP
- MVVM
- Composable Archiecture
- Clean Architecture
- Unidirectional Data Flow
- VIPER
- VIP
- SwiftUI
- Data Source
- Best Practices
MVC
Model View Controller
Posts
- Model-View-Controller, Apple Docs
- Looking at Model-View-Controller in Cocoa
- Do MVC like itโs 1979
- A Better MVC, Part 1: The Problems
๐ - Using child view controllers as plugins in Swift
- MVC.
- Model-View-Controller without the Controller
- Just Controllers
- A Better MVC
- MVC: Many View Controllers
Repos
- MVCTodo A very simple "To Do" app to illustrate the principles from my "A Better MVC" talk
MVP
Model View Presenter
Posts
Repos
- AppDemo
- foodMVP
- ios-mvp-clean-architecture
- iOS_MVC_MVP_MVVM_SampleApp
- MVP-iOS
- MVP-iOS
- MVPExample
- MVP
MVVM
Model View ViewModel
Posts
- Introduction to MVVM
- MVVM is Not Very Good
- Simplification Of IOS View Controllers: MVVM Or Presentation Controls?
- On MVVM, and Architecture Questions
- Reddit-MVVM-Benchmark MVVM with FRP Benchmark project
- The MVVM Pattern for iOS Apps in Swift: a Pragmatic Approach
- MVVM Is Quite Okay at What It Is Supposed to Do
- MVVM-C In Practice
- MVVM in Practice - RWDevCon Session
- View Models at Kickstarter
- How not to get desperate with MVVM implementation
- iOS Architecture: A State Container based approach
๐ - Different flavors of view models in Swift
- Reactive view models, simplified
Repos
- TheReactiveArchitecture The modern and reactive architecture for RxSwift application
- kickstarter vm structure Rx input and output
- Coordinator-MVVM-Rx-Example Example of MVVM-C architecture implemented with RxSwift
- RxCoordinator iOS framework that helps you implement Model-View-ViewModel-Coordinator architecture.
- ModernMVVM - A movie iOS app built with the MVVM architecture, Combine and SwiftUI frameworks
Composable Architecture
Repos
- swift-composable-architecture A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
Clean Architecture
Posts
Repos
- CleanStore A sample iOS app built using the Clean Swift architecture
- CleanArchitectureRxSwift Example of Clean Architecture of iOS app using RxSwift
๐ - Reminders An iOS application written in Swift to demonstrate how to implement a Clean Architecture in iOS
- CleanSwiftArchitectureGenerator A generator of Clean Swift Architecture files
Unidirectional Data Flow
Posts
- Unidirectional Data Flow in Swift: An Alternative to Massive View Controllers
- Ziggurat iOS App Architecture
- ziggurat App architecture with one-way data data flow and view models
- Rethinking iOS App Architecture Using a One Way Data Flow
- Elmification of Swift
- StateView Views that automatically update themselves.
- Render Swift and UIKit a la React.
- Real World Flux Architecture on iOS
โญ - Turning UIKit Inside Out
โญ - App Coordinators and Redux on iOS
- ReSwift Tutorial: Memory Game App
- Building a Unidirectional Data Flow App in Swift with Realm
- Architecture Thoughts: Migrating Marvel's iOS App to ReSwift ..
- Functional architecture for Swift
- iOS Architecture: Separating logic from effects โญ
Repos
- ReSwift Unidirectional Data Flow in Swift - Inspired by Redux
โญ - Reactor Unidirectional data flow in Swift
- Aftermath Stateless message-driven micro-framework in Swift
- Renderer Swift and UIKit a la React.
- Few.swift Views as functions of their state.
- SwiftFlux A type-safe Flux implementation for Swift
- katana-swift Swift Apps in a Swoosh
- Dispatch Multi-store Flux implementation in Swift.
- ReactorKit A framework for reactive and unidirectional Swift application architecture
๐ ๐ - RxFeedback Architecture for RxSwift
- tea-in-swift The Elm Architecture in Swift
- Suas-iOS Unidirectional data flow architecture implementation for iOS, macOS, tvOS and watchOS http://suas.readme.io
- ReactComponentKit ReactComponentKit is a library for building UIViewController based on Components.
- Highway Fast and simple multi-store Redux-like architecture for iOS/OSX applications
- Mobius.swift A functional reactive framework for managing state evolution and side-effects from Uber
- ReCombine A Swift Redux library utilizing Apple's Combine Framework
- SwiftRex Swift + Redux + (Combine|RxSwift|ReactiveSwift) -> SwiftRex
- tempura-swift A holistic approach to iOS development, inspired by Redux and MVVM
- OneWay A Swift library for state management with unidirectional data flow.
VIPER
View Interactor Presenter Entity Router
Posts
- Introduction to VIPER
- Architecting iOS Apps with VIPER
- Brigadeโs Experience Using an MVC Alternative
- First Observations on TDD with VIPER
- Building Modular iOS Apps
- iPhreaks Show โ VIPER with Conrad Stoll and Jeff Gilbert
- Clean Architecture - VIPER by Redbooth
- Humble Object Pattern in Swift
- Should I use Viper architecture for my next iOS application, or it is still very new to use?
- VIPER to be or not to be?
- iOS Project Architecture: Using VIPER
- iOSModulesArchitecture Quick example of how divide an app into modules to respect the SOLID principles
- ARCHITECTING MOBILE APPS WITH (B)VIPER MODULES - A STRUCTURED ENGINEERING APPROACH FOR BIG MOBILE APPS
- Clean Architecture - VIPER at Redbooth by @sergigracia
- VIPER to be or not to be
- Building iOS App With VIPER Architecture
- Viper Framework for iOS using Swift v3
- VIPER-S: WRITING YOUR OWN ARCHITECTURE AND UNDERSTAND ITS IMPORTANCE (PART 3)
- Facing the VIPER
- Building a Framework with VIPER
- Implementing VIPER Architecture Pattern for iOS
Repos
- iOS-Viper-Architecture A detailed sample app that implements VIPER architecture
- iOS Viper XCode Templates Another detailed sample app that implements VIPER architecture with code generation templates
- iOSSwiftStarter A sample iOS app written in Swift using the VIPER architecture.
- VIPER-TDD A sample iOS app written in Swift 4 using VIPER architecture with unit tests.
VIP
View Interactor Presenter
Posts
SwiftUI
Posts
- SwiftUI Architectures: Model-View, Redux & MVVM
- Building a Scalable SwiftUI Architecture
- SwiftUI and State Management
- Building complex modular architectures with SwiftUI, Combine and Swift Package Manager (SPM)
Repos
- Harvest Harvest: Apple's Combine.framework + State Machine, inspired by Elm.
- Stinsen Coordinators in SwiftUI. Simple, powerful and elegant.
- FlowStacks FlowStacks allows you to hoist SwiftUI navigation and presentation state into a Coordinator
Data Source
Posts
- Lightweight iOS View Controllers
- Appleโs Take on App Architecture
- Fluent Pagination - no more jumpy scrolling
- AdvancedCollectionView
- iOS: UITableView controller
- Nestable
- Advanced UITableViews Made Simple: YLTableView
- Typed, yet Flexible Table View Controller
- Complex table view state changes made easy
- UMT2016 - John Sundell - Building component-driven UIs at Spotify
- Refactoring at Scale โ Lessons Learned Rewriting Instagramโs Feed
- IGListKit Tutorial: Better UICollectionViews
- Dealing with Complex Table Views in iOS and Keeping Your Sanity
- iOS: How to build a Table View with multiple cell types
- Using Dedicated Objects as Delegates & Datasources
- Reusable data sources in Swift
- UITableView Datasource with SwiftUI-style syntax
Repos
- Mensa Smart, modern table and collection views on iOS.
- RLDTableViewSuite Reusable table view controller, data source and delegate for all your UITableView needs
- PagedArray A Swift data structure for easier pagination
- ReadingList An example on using the Mantle Modeling Framework with Overcoat AFNetworking extension.
- DTTableViewManager Protocol-oriented UITableView management, powered by generics and associated types.
- Spots Spots is a view controller framework that makes your setup and future development blazingly fast
โญ - JSQDataSourcesKit Type-safe, value-oriented, composable data source objects that keep your view controllers light
- HubFramework Spotifyโs component-driven UI framework for iOS
- ComponentKit A React-inspired view framework for iOS
- IGListKit A data-driven UICollectionView framework for building fast and flexible lists.
- JASONETTE-iOS Native App over HTTP
โญ โญ ๐ - StackScrollView iOS Form UI Builder in Swift (powered by UICollectionView)
- ScrollingStackViewController A view controller that uses root views of child view controllers as views in a UIStackView.
- ScrollingStackContainer Efficient Scrolling UIStackView in Swift
- Flow A new declarative approach to UITableView
- FlowKit Declarative type-safe manager for UITableView & UICollectionView
- Static Simple static table views for iOS in Swift.
- Bento Swift library for building component-based interfaces on top of UITableView
- ReactiveLists React-like API for UITableView & UICollectionView
- LiveCollections
- AloeStackView A simple class for laying out a collection of views with a convenient API, while leveraging the power of Auto Layout
โญ - Carbon A declarative library for building component-based user interfaces in UITableView and UICollectionView
- Owl A declarative type-safe framework for building fast and flexible lists with Tables & Collections
- Collor A MVVM data-oriented framework for UICollectionView with great and useful features.
- FunctionalTableData Declarative UITableViewDataSource implementation
- Upstream โฒ๏ธ Adapted Data Source in Swift and a little bit more ๐ ๐
- Micro Fast diffing and type safe SwiftUI style data source for UICollectionView
๐ ๐ - Epoxy - Epoxy is a suite of declarative UI APIs for building UIKit applications in Swift
Best Practices
General
- Benchmarking MVC vs MVP vs MVVM in iOS
- iOS Architecture Patterns Demystifying MVC, MVP, MVVM and VIPER
๐ - Clean Cocoa
โญ - iOS Development: You're Doing It Wrong
- How to separate view controllers from their view logic
- 8 Patterns to Help You Destroy Massive View Controller
- Intentions
- Model-View-ViewModel for iOS
- Singletons, AppDelegates and top-level data.
- Collection Extensions
- Model View Controller Presenter
- Model View Whatever
- How We Modularized Mediumโs iOS codebase
- Lighter View Controller Swift
- Improve your iOS Architecture with FlowControllers
- Massive View Controller
- Modern application architectures (Reactive programming, MVVM and beyond)
- โTree of Modelsโ as an Alternative App Architecture Model
โญ - A composable pattern for pure state machines with effects
- Architectures comparison
- Basecamp 3 for iOS: Hybrid Architecture
- Highly maintainable app architecture
โญ - Driving view state through data
- Improving Existing Apps with Modern Best Practices
๐ - Platformizing UI code
- The State of Statelessness
- Good iOS Application Architecture
๐ - Much ado about iOS app architecture โญ
- The Presentation Model
- The New Swipe Right with Swift
- Zero Knowledge Architectures for Mobile Applications
- Top-down iOS error architecture
- App Architectures: Remixed
- iOS Application Architecture
- How to move data sources and delegates out of your view controllers
- App Architecture and Object Composition in Swift
- Let's Talk Architecture
- The Lost Art of System Design
- Maintaining architecture in iOS apps
- Four Rules of Simpler iOS Software Design
- The Art of Designing Code โญ
- Why UI Design matters
API Design
- Everyone is an API designer
๐ - Lightweight API design in Swift
- API Design
- Testable interface design with enums
- Designing Swift APIs
- Designing Accessible APIs
Dependency Injection
- Managing objects using Locks & Keys in Swift
โญ - How To Control The World
- Structure and Interpretation of Swift Programs
- Extracting view controller actions in Swift
- Behaviors in iOS Apps
- Logic controllers in Swift
- Model controllers in Swift
- Using protocol compositon for dependency injection
- Cleaning up your dependencies with protocols
- Swift Dependency Injection via Property Wrapper
Refactoring
Model
- Structuring model data in Swift
- Utilizing value semantics in Swift
- Type safe temporary models
- Defining testing data in Swift
View and Model
- View Descriptors
- Preventing views from being model aware in Swift
- UITableViewCell and Model
- Building Better Views
AppDelegate
Repos
- Logician Logic programming in Swift
- modular-architecture Examples of iOS Modular Architecture in Swift
- Delta Delta takes an app that has custom state management spread throughout all the VCs and simplifies it by providing a simple interface to change state and subscribe to its changes.
- eigen The Art World in Your Pocket or Your Trendy Tech Company's Tote, Artsy's iOS app
- ENGINEERING THE ARCHITECTURE BEHIND UBERโS NEW RIDER APP
- RIBs Uber's cross-platform mobile architecture framework.
- Alicerce A base for iOS Applications by Mindera
- Flint The Flint framework for building apps on Apple platforms using Feature Driven Development
- ios-architecture A collection of iOS architectures - MVC, MVVM, MVVM+RxSwift, VIPER, RIBs and many others
- SwiftHub GitHub iOS client in RxSwift and MVVM-C clean architecture
Sync
- Introducing the Realm Mobile Platform: Realtime Sync Plus Fully Open Source Databas
- wire-ios-sync-engine iOS synchronization library for Wire
Cache
- MVC-RS
- The Missing Light Persistence Layer for Swift
- How to Abstract Your Persistence Layer and Migrate to Another One on iOS With JustPersist
- The Flat Cache
- Cache Nothing but Cache
- RocketData
- Managing Consistency of Immutable Models
- CTPersistance
- JustPersist
- Pantry
- The Many Offline Options for iOS Apps
- How to Design Offline-first Approach in a Mobile App
- Flannel: An Application-Level Edge Cache to Make Slack Scale
Asynchronous/Reactive Programming
- Comparative Asynchronous Programming
- Thinking in RxSwift
- Reducers
- RxSwift Reactive Programming in Swift
- Operations A Swift framework inspired by WWDC 2015 Advanced NSOperations session.
- Modern RxSwift Architectures
- Architecturing an app with functional reactive programming
- TheBinderArchitecture A declarative architecture based on bindings
Navigation/Coordinator/FlowController
- Coordinators Redux
- Deep links with no brainer
- Flow Controllers on iOS for a Better Navigation Control
- Improve your iOS Architecture with FlowControllers
- Coordinators Essential tutorial
- MVVM-C A simple way to navigate
- Compass Compass helps you setup a central navigation system for your application
- Deep Linking at Kickstarter
- One navigator to rule them all - iOS Conf SG 2017
- URL Routing with Compass โญ
- Weavy Navigation framework for iOS applications based on a weaving pattern
- RxFlow RxFlow is a navigation framework for iOS applications based on a Reactive Flow Coordinator pattern
- A Flexible Routing Approach in an iOS App
- Navigation in Swift
- Coordinators Essential tutorial. Part I
- Coordinators Essential tutorial. Part II
- Coordinators Redux
- Coordinators โ Soroush Khanlou - CocoaHeads Stockholm
- Passing dependencies through Coordinator chain
- MVC-C ยท Injecting Coordinator pattern in UIKit
- XCoordinator Powerful navigation library for iOS based on the coordinator pattern
- Controlling Hierachies
- Coordinator and FlowController
- Advanced coordinators in iOS
- iOS Coordinators: A Storyboard Approach
- The Navigator
Analytics
- Building an enum-based analytics system in Swift
- When Not to Use an Enum
- Misusing enums
- Logging in Swift
- Swift Analytics
- Analytics - How to avoid common mistakes in iOS
SDK
- line-sdk-ios-swift Provides a modern way of implementing LINE APIs
- BackchannelSDK-iOS The official iOS SDK for Backchannel
- SpotifyLogin Swift framework for authenticating with the Spotify API
- stripe-ios Stripe iOS SDK
Functional
Types
- Making illegal states unrepresentable
- Functional Snippet #13: Phantom Types
- Never
- Pure functions in Swift
- Phantom types in Swift
Protocols
- Mixins over Inheritance
- Mixins and traits in Swift 2.0
- Protocol Oriented Programming is Not a Silver Bullet
- Value-Oriented Programming
- Beyond Crusty: Real-World Protocols
- A Little Respect for AnySequence
- Protocols Sidebar I: Protocols Are Nonconformists
- Protocols II: A Mockery of Protocols
- A case of premature abstractions
- Protocol-Oriented Library Design
- Protocol Witnesses - Brandon Williams - App Builders 2019
Code
- Splash A fast, lightweight and flexible Swift syntax highlighter for blogs, tools and fun!
Separation of Concerns
Testing
- Defining testing data in Swift
- Time traveling in Swift unit tests
- The power of UserDefaults in Swift
- Unit testing asynchronous Swift code
Generic
Cross platform
- LibSlack: the C++ library at the foundation of our client application architecture
- The (not so) hidden cost of sharing code between iOS and Android
- Client Consistency at Slack: Beyond Libslack
Remote Config / Feature Flagging
Licence
This project is released under the MIT license. See LICENSE.md.