Skip to content

Sourcery Pro

Sourcery Pro Icon

Sourcery Pro extends Xcode with the ability to create your own live templates that understand your code.

Why write same repetitive Swift patterns over and over again if you don’t need to?

Download on the Mac App Store

🎭 Mock Generation

Create mock implementations from selected types instantly

📦 Codable Support

Add Codable support to enums with associated values

🏗️ TCA Boilerplate

Kickstart your Composable Architecture boilerplate

🧪 Test Generation

Generate property level tests and test specs

🎨 SwiftUI Views

Generate SwiftUI views from your structs

🔍 Prisms & Lenses

Create functional programming patterns for your data

Powerful Template Editor

It comes bundled with 14 starting templates and features a powerful Template editor with code completion, inline documentation, and a built-in error checker/linter that makes writing your custom automation a breeze.

Battle-Tested Foundation

Built on top of my Sourcery tool that is used in over 40,000 Swift apps, including products like Airbnb, Bumble, and The New York Times.

It saved those apps millions of dollars in development time, and now you can save both your time and regain some of the sanity by stopping to write the same code over and over again. How much is your time worth?

This app is the culmination of 5 years of work and thousands of development hours—it’s simply the most powerful Xcode extension ever created.

Key Features

Xcode Integration

Xcode Source Extension in action

The app provides an Xcode Source extension that lets you run templates against the code in your projects.

Editor Capabilities

Comes bundled with over 10 templates to get you started
Type attribution for templates, even though Stencil doesn’t have types
Powerful code completion and inline documentation
Inline errors and warnings to catch issues early
Over 20 different color themes to choose from
Drag & drop import/export to share with community or team
Bind key shortcuts to templates right in Xcode

Writing Templates

Sourcery Pro adds additional functionality on top of regular Stencil:

Frequently Asked Questions

Sourcery Pro extension doesn’t appear in my editor

This can happen if you have multiple Xcode instances or other non-standard setup. Follow this guide on how to fix it using PluginKit.

My templates don’t appear in Xcode

When you add/remove templates you need to restart Xcode—it’s a limitation of Xcode Source Extensions. Also make sure that you marked Templates as available in Xcode (default). You can right-click on a template in the list to see other options.

How do I share templates?

You have two easy options:

  • Right-click on the template list to see the context menu
  • Or just drag & drop templates from/to the list

Drag and drop templates

Where can I report feedback or ask questions?

Please use the Feedback repository for questions, feedback, and discussions.

Ready to boost your productivity?

Even if you never heard of Sourcery, you’ll have no problem creating your own templates.

Get Started with Sourcery Pro