Sourcery Pro


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?

  • Create mock implementation from a selected type
  • Add Codable support to enums with associated values
  • Kickstart your Composable Architecture boilerplate
  • Generate property level tests
  • Generate test specs from your classes
  • Generate SwiftUI view from a struct
  • Create Prisms and Lenses for your data

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.

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.

Even if you never heard of Sourcery, you'll have no problem creating your own templates, and if you are a Sourcery user this tool not only makes creating your templates a completely different experience but also adds additional use-cases that are simply not possible with full CLI automation that I normally recommend with it.

You can share your templates with your friends and team by drag & dropping or right-clicking on the template in the list.

More

  1. Xcode integration
  2. Editor
  3. Writing templates

Xcode Integration

The app provides an Xcode Source extensions that let's you run templates you have against the code of your projects, see it in action:

Editor

Sourcery Pro standalone app features an editor:

  • Comes bundled with over 10 templates to get you started
  • Even though Stencil doesn’t haves types, Sourcery Pro gives you ability to add type attribution to your templates
  • Powerful code completion and inline documentation to make writing your own templates simpler.
  • Inline errors and warnings
  • Over 20 different color themes to choose from
  • Drag & Drop and import / export your templates to share with community or team members (Cloud sharing coming soon)
  • Bind key shortcuts to Sourcery Pro templates right in Xcode

Writing templates

Sourcery Pro adds additional functionality on top of regular stencil:

  • {% typed variable as MyType %} lets you add type information to macros, simply declare it after defining your macro and Sourcery Pro will start providing you with all type information for your variable
  • {% newline %} ends whitespace trimming in the template and adds an extra empty line

FAQ

  1. Sourcery Pro extension doesn't appear in my editor, what to do?
  1. My templates don't appear in Xcode?
  • When you add/remove templates you need to restart Xcode, it's the limitation of Xcode Source Extension. Also make sure that you marked Templates as available in Xcode (default), you can right click on template in the list to see other options
  1. How do I share templates?
  • Right click on the template list to see context menu
  • Or just drag & drop from / to it
  1. Where can I report feedback or ask questions?
You've successfully subscribed to Krzysztof Zabłocki
Great! Next, complete checkout to get full access to all premium content.
Error! Could not sign up. invalid link.
Welcome back! You've successfully signed in.
Error! Could not sign in. Please try again.
Success! Your account is fully activated, you now have access to all content.
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.