This Xcode plugin makes
private in Xcode.
|Super easy installation|
|Outlets should be private, now they are!|
You can install
OptionalOutlets using Alcatraz.
First, install Alcatraz using
curl -fsSL https://raw.githubusercontent.com/supermarin/Alcatraz/deploy/Scripts/install.sh | sh
- Restart Xcode
- Click on
- Search and Install
- Restart Xcode
You can also install the plugin manually by cloning this repository and building the project. It'll be installed on
You should restart Xcode after that.
What does this do?
The primary goal of this plugin is to make
Optional. By default, Xcode uses
ImplicitlyUnwrappedOptionals, but that's dangerous and even though you can safely unwrap them most people don't. The secondary goal is to make your
private. Using outlets outside a class is a code smell and seldom is needed. This plugin automatically makes your outlets
private, simple as that! Don't worry, they are independent rules and you can disable them at any time.
- @marcelofabri_ for his CocoaHeads talk about IBOutlint which gave me the motivation to write this and from which I've shamelessly copied most of the code.
- @chrisfsampaio for adding support to making outlets
private, adding an example project, adding feature toggles, reporting bugs and a bunch of other stuff I probably forgot to mention.
- @orta for blogging about his experience on building a Xcode plugin.
- @kattrali for providing a template for Xcode plugins.
- @gsampaio for telling me to throw the Swift version of this plugin away, copy Fabri's and save ~8Mb for all the users.
Please submit an issue on GitHub and provide information about your setup.
This project is licensed under the terms of the MIT license. See the LICENSE file.