Design-Patterns-In-Swift is a repository that translates classic software engineering design patterns (from sources like the Gang of Four) into Swift code examples, so you can see how those patterns look in a modern, strongly typed, object-/protocol-oriented language. It covers creational, structural, and behavioral patterns: singletons, factories, decorators, observers, strategy, command, mediator, and more. For each pattern, you’ll typically see one or more Swift implementations, commentary on where it makes sense in a Swift architecture, and caveats about when you might prefer pure protocol composition or using functional patterns instead. The examples aim to be readable and idiomatic—not overly abstract or contrived—so developers can adopt or adapt them directly.

Features

  • Collection of many design patterns implemented: e.g. Creational, Behavioral, Structural families (e.g. Strategy, Observer, Adapter, Singleton, etc.)
  • Provided in playground/-friendly format so users can interactively read and run examples in Xcode playgrounds
  • Chinese (中文) translated versions of playground/examples/files are included
  • Scripts to generate playgrounds from source and translations (for both English and Chinese)
  • Well-documented: README with table of contents of patterns, explanations of pattern intent, usage, etc.
  • Licensed under GPL-3.0, which means open source but with copyleft requirements (if modifications are shared etc.)

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

GNU General Public License version 3.0 (GPLv3)

Follow Design Patterns in Swift

Design Patterns in Swift Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Design Patterns in Swift!

Additional Project Details

Operating Systems

Apple iPhone, Mac

Programming Language

Swift

Related Categories

Swift Libraries

Registered

2025-09-22