A Xcode Source Editor Extension to sort your header imports and remove duplicates, similar to iSort.

Overview

CleanHeaders

An Xcode plug-in to format your import headers in a systematic manner. It simply removes duplicates, spaces and sorts them alphabetically making it much more easier to read and avoid duplicate imports. Works with @imports, #include, #import and import.

Preview

Usage

Usage

Select the option from Editor > Clean Headers > Sort Headers. You can add shortcuts from Xcode preferences.

Please run sudo /usr/libexec/xpccachectl and restart your Mac before running the extension if you are on macOS 10.11 El Capitan.

TODO/Limitations

  • Missing tests

Support for Alcatraz (Deprecated)

Install the older version v1.0.0.

Alternatively you can also clone the release, build and run CleanHeaders, restart Xcode.

Credits

I am using some helper functions to deal with the filtering out source text fromxTextHandler-objc, thanks for the awesome class.

You might also like...
CleanClosureXcode - An Xcode Source Editor extension to clean the closure syntax.
CleanClosureXcode - An Xcode Source Editor extension to clean the closure syntax.

Clean Closure - Xcode Source Editor Extension Clean Closure is a simple Xcode Source Editor Extension for Xcode 8. It parses each line of a file to si

DocumenterXcode - Attempt to give a new life for VVDocumenter-Xcode as source editor extension.
DocumenterXcode - Attempt to give a new life for VVDocumenter-Xcode as source editor extension.

DocumenterXcode Xcode source editor extension which helps you write documentation comment easier, for both Objective-C and Swift. This project is an a

An Xcode Source Editor Extension that helps navigating to many places easier
An Xcode Source Editor Extension that helps navigating to many places easier

XcodeWay ❤️ Support my apps ❤️ Push Hero - pure Swift native macOS application to test push notifications PastePal - Pasteboard, note and shortcut man

UICollectionView replacement of UITableView. Do even more like Parallax Header, Sticky Section Header. Made for iOS 7.

CSStickyHeaderFlowLayout Contributors For anyone who'd like to be a contributor to the repository, please read the Contribution Guideline Parallax, St

LinkedLog is a Xcode plugin that includes a Xcode PCH header file template that adds the macros `LLog` and `LLogF` and parses their output to link from the console to the corresponding file and line.
LinkedLog is a Xcode plugin that includes a Xcode PCH header file template that adds the macros `LLog` and `LLogF` and parses their output to link from the console to the corresponding file and line.

LinkedLog Xcode Plugin LinkedLog is a Xcode plugin that includes a Xcode PCH file template that adds the macros LLog and LLogF. The LLog macro will wo

How to use swiftlint to identify unused code or unused imports in a Swift codebase

Swift compilation database This repository demonstrates how to use swiftlint to identify unused code or unused imports in a Swift codebase. How to run

The easiest way to prepare, play, and remove sounds in your Swift app!

Chirp The easiest way to prepare, play, and remove sounds in your Swift app! ##Installation ###CocoaPods Installation Chirp is available on CocoaPods.

BabySortingToyGame - Build a little game for babies to sort shapes in the correct location. This is made in SwiftUI using drag gestures.
BabySortingToyGame - Build a little game for babies to sort shapes in the correct location. This is made in SwiftUI using drag gestures.

This is a demo to build a little mini-game "for babies". It's inspired in this kind of games:

React-native-photo-editor - Photo editor using native modules for iOS and Android
React-native-photo-editor - Photo editor using native modules for iOS and Android

🌄 Image editor using native modules for iOS and Android. Inherit from 2 available libraries, ZLImageEditor (iOS) and PhotoEditor (Android)

Xcode Plugin helps you find missing methods in your class header, protocols, and super class, also makes fast inserting.

FastStub-Xcode Life is short, why waste it on meaningless typing? What is it? A code generating feature borrowed from Android Studio. FastStub automat

A fully fledged syscfg editor. Just the editor. Written in pure swift.
A fully fledged syscfg editor. Just the editor. Written in pure swift.

MagicCFG Reloaded The SysCFG Writing Utility - UPDATED, OSV Report Bug Table of Contents About MagicCFG Reloaded Getting Started Roadmap Contact Credi

FileExplorer is a powerful iOS file browser that allows its users to choose and remove files and/or directories
FileExplorer is a powerful iOS file browser that allows its users to choose and remove files and/or directories

FileExplorer (iOS 9.0+) 👷 Project created and maintained by Rafał Augustyniak. You can find me on twitter (@RaAugustyniak). Introduction FileExplorer

FileExplorer is a powerful iOS file browser that allows its users to choose and remove files and/or directories
FileExplorer is a powerful iOS file browser that allows its users to choose and remove files and/or directories

FileExplorer (iOS 9.0+) 👷 Project created and maintained by Rafał Augustyniak. You can find me on twitter (@RaAugustyniak). Introduction FileExplorer

Menubar app to remove link tracking parameters automatically
Menubar app to remove link tracking parameters automatically

TrackerZapper Website and more info TrackerZapper is a Mac app that sits in your menubar and silently removes tracking parameters from any links you c

XcodeEquatableGenerator - Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.
XcodeEquatableGenerator - Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.

Depricated! There is not need for it at the moment as Swift compiler can do that for us 🚀 Swift Equatable Generator Xcode 8 Source Code Extension wil

SwiftInitializerGenerator - Xcode Source Code Extension to Generate Swift Initializers
SwiftInitializerGenerator - Xcode Source Code Extension to Generate Swift Initializers

Swift Initializer Generator This Xcode Source Code Extension will generate a Swift initializer based on the lines you've selected. Handy if you made a

Multiliner - An Xcode source extension to expand lengthy lines
Multiliner - An Xcode source extension to expand lengthy lines

Multiliner An Xcode source extension to expand lengthy lines. Super lightweight, 1 file. It expands long lines. That's it! Works with: Initializers Fu

CodeEditTextView - An Xcode-inspired code editor view written in Swift powered by tree-sitter for CodeEdit
CodeEditTextView - An Xcode-inspired code editor view written in Swift powered by tree-sitter for CodeEdit

An Xcode-inspired code editor view written in Swift powered by tree-sitter for CodeEdit. Features include syntax highlighting (based

Xcode plugin to open the GitHub page of the commit of the currently selected line in the editor window.
Xcode plugin to open the GitHub page of the commit of the currently selected line in the editor window.

Show in GitHub / BitBucket Xcode plugin to open a related Github or BitBucket page directly from the Xcode editor code window. Installs easily through

Comments
  • Not work in Xcode 7.2

    Not work in Xcode 7.2

    I install using Alcatraz. and I press the allow load the bundle when the xcode restart.

    There are the Clean Header in the Edit menu, and the shortcut do nothing!

    opened by Whirlwind 3
  • Keep associated .h file at the top

    Keep associated .h file at the top

    Love this plugin, but one common practice in .m files is to keep that classes .h import at the top of the imports.

    When sorting using this plugin, it will sort it alphabetically along with all of the other headers, so I have to manually put it back at the top.

    Minor, but something that could be improved

    opened by ryang1428 2
  • Change the classname of `TRVSXcode`

    Change the classname of `TRVSXcode`

    This is used by Travis's original Clang Format Xcode plugin, so whenever both this plugin and ClangFormat-Xcode are loaded together, users will see:

    objc[96338]: Class TRVSXcode is implemented in both /Users/tonyarnold/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CleanHeaders.xcplugin/Contents/MacOS/CleanHeaders and /Users/tonyarnold/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ClangFormat.xcplugin/Contents/MacOS/ClangFormat. One of the two will be used. Which one is undefined.
    
    opened by tonyarnold 1
Releases(v1.0.0)
A lightweight and powerful editor for localizing iOS, macOS, tvOS, and watchOS applications.

It is Strings but with a Z ?? Loved the project? Please share it with your friends and give it a ⭐️ Stringz is a lightweight and powerful editor that

Heysem Katibi 848 Jan 7, 2023
Finite Automata iPad Editor

Automata Editor This is a repository of Automata Editor which is an iPad app for editing finite automata. It uses CoreML to recognize your strokes and

Marek Fořt 56 Dec 13, 2022
WIP document editor for iOS

¶ Pilcrow This is an work-in-progress experiment on building a document editor similar to Bear, Notion, Notes.app, Craft, Dropbox Paper, and others. I

Zach Waugh 54 Dec 30, 2022
SwiftUI Implementation of RichEditorView (WYSIWYG Editor)

A Rich Text Editor (WYSIWYG Editor) for your application by combining UIKit and SwiftUI.

Formaloo 36 Jan 7, 2023
null 1 Jan 24, 2022
Import - Xcode extension for adding imports from anywhere in the code ☝️

Import ☝️ Xcode extension for adding imports from anywhere in the code. Now available on App Store Why? Because sometimes you are on 300th line of cod

Marko Hlebar 839 Nov 10, 2022
XTextHandler - Xcode Source Editor Extension Tools (Xcode 8 Plugins)

Download Let's Swift! xTextHandler has been rewritten in Swift. The Objective-C version can be found in: https://github.com/cyanzhong/xTextHandler-obj

Ying Zhong (Inactive) 1.5k Sep 7, 2022
Sort import statements in your Swift source code

Sort Swift Imports Sort import statements in your Swift source code. ?? Swift Li

Dariusz Rybicki 2 Dec 19, 2022
A command-line tool to sort Xcode's `.xcodeproj` file.

XcodeProjSorter A command-line tool to sort Xcode's .xcodeproj file. It sorts following sessions: PBXGroup PBXResourcesBuildPhase PBXSourcesBuildPhase

Nelson 7 Apr 27, 2022