Periphery logo

Eliminate Unused Swift Code

Periphery analyzes Swift projects to identify unused code

100% of Results for Free

No signup or credit card required

Quick & simple installation

No time restriction

Install & run. It's that simple.

Get Started

Unused Code Is a Burden

Are your refactorings complicated by awkward code that might no longer be needed?
How many minutes do you waste every day reading unused code?

As any good chef will attest to, keeping your workspaces clean and tidy is fundamental. We believe the same applies to software - keeping your projects free of unused code is fundamental practice of professional software development.

Take pride in your work. Keep it clean.

Read our Manifesto

Comprehensive Analysis

Periphery can identify a wide range of unused declarations in your project.
Swift alternative logo
  • Classes, structs & protocols
  • Functions, parameters & properties
  • Enums & individual cases
  • Type aliases & associated types

More than a simple reference checker…

Periphery applies advanced analytical heuristics to identify unused code that a simple reference checker would have no hope of finding.

To Periphery code is more than a static graph of nodes and edges; Periphery mutates your application's structure in memory to detangle a multitude of self-referential, semantic & redundant references.

Unused Function Parameters

Unused function parameter analysis helps keep your interfaces clean.

'name' is unused
'name' is unused
protocol Greeter { func greet(name: String) func farewell(name: String) } class InformalGreeter: Greeter { func greet(name: String) { print("Sup " + name + ".") } func farewell(name: String) { print("Cya.") } }

Periphery not only identifies simple cases of unused parameters, it also takes into account the context of your application.

A parameter of a protocol function will only be identified as unused if the parameter is also unused in all implementations.

The same applies to overidden functions, parameters are only identified as unused if they're also unused in the base function and all overriding functions.

Learn more about function parameter analysis

Redundant Protocols

Redundant protocol conformance is a prime example of Periphery's analytical power.

'Greeter' is unused
protocol Greeter { func greet() } class MyGreeter: Greeter { func greet() { print("Hello, World!") } } let greeter = MyGreeter() greeter.greet()

Periphery can identify protocols that are conformed to, but which are not directly used in a specialization. In this example, Greeter can be removed.

These situations can be hard to identify with the naked eye, especially if the protocol is conformed to by multiple classes spanning multiple files.

Learn more about protocol analysis

Assign-only Properties

Identification of assign-only properties is perfect for rooting out unused dependencies.

'presenter' is unused
class Greeter { static func make() -> Self { return self.init(presenter: inject()) } let presenter: Presenter init(presenter: Presenter) { self.presenter = presenter } func greet() { print("Hello, World!") } }

Periphery can identify properties that are assigned a value, but which are never read from.

Often when removing old features the focus is on deleting functions, properties once used by those functions can easily slip under the radar.

If you do dependency injection via the constructor, you'll love this feature!

Learn more about assign-only properties

Xcode Integration

Xcode integration example

Periphery outputs results in a format Xcode understands. Unused code is highlighted as warnings, just like you're accustomed to with other build warnings.

Integration is as simple as creating an Aggregate build target with a Run Script phase.

Xcode Integration Guide

We Command Line Junkies
Periphery is primarily a command line driven tool, rest assured you can use it without ever touching a mouse!

Your Code Is Safe

The safety of your intellectual property is paramount.

That's why Periphery performs 100% of its analysis locally, on your computer. That means no remote services, your code simply never leaves your computer.

Learn more about validating the security of Periphery

Pro Mode

Unlock the tools to integrate Periphery into your development process

Reuse build logs to dramatically reduce analysis time

Additional aggressive analysis heuristics

Output results in JSON or CSV

Advanced source file filtering

Indie Team


20% discount
1 year license
team of up to 2 developers

Small Team


20% discount
1 year license
team of up to 5 developers

Medium Team


20% discount
1 year license
team of up to 10 developers

Large Team


20% discount
1 year license
team of up to 20 developers

Pricing Explained  

Pricing is based on the number of developers in your product team working with Swift, not the number of developers that will directly use Periphery. Team size is a strongly correlated to the rate of change within your product, and thus the rate at which your product will accumulate unused code.

Need a Larger License?

Get in touch, we'll accommodate your needs.

Contact Us

Need a Helping Hand?

Hire the creator of Periphery to eliminate unused code from your project

Removing unused code can be time consuming - care must be taken to ensure no bugs are introduced, and that removal does not impact other team members.

As a senior iOS engineer and through my time developing Periphery, I've removed many thousands of lines of code from projects, both large and small. My experience ensures your project is handled in a professional and timely manner.

Get in touch for rates, availability and referrals.

Contact Ian