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
Auth0 for AI Agents now in GA Icon
Auth0 for AI Agents now in GA

Ready to implement AI with confidence (without sacrificing security)?

Connect your AI agents to apps and data more securely, give users control over the actions AI agents can perform and the data they can access, and enable human confirmation for critical agent actions.
Start building today
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