All Projects → zoejessica → Accesscontrolkitty

zoejessica / Accesscontrolkitty

Licence: mit
Xcode extension - quickly change access control level (public, private etc.) of selected Swift code by Editor menu item or keyboard command

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Accesscontrolkitty

Linessorter Xcode Extension
Xcode Extension that helps you keep your import statements and long code lists organized and uniform
Stars: ✭ 54 (-54.62%)
Mutual labels:  xcode, xcode-extension, developer-tools
Xgist
Xcode extension to send code to GitHub's Gist
Stars: ✭ 75 (-36.97%)
Mutual labels:  xcode, xcode-extension, developer-tools
Playalways
Create Xcode playgrounds from your menu bar
Stars: ✭ 515 (+332.77%)
Mutual labels:  xcode, xcode-extension, developer-tools
Xcode Defaults
Awesome and useful Xcode defaults
Stars: ✭ 399 (+235.29%)
Mutual labels:  xcode, developer-tools
Xcodesourceeditorextension Alignment
This Xcode source editor extension align your assignment statement.
Stars: ✭ 211 (+77.31%)
Mutual labels:  xcode, xcode-extension
Awesome Xcode Extensions
Awesome native Xcode extensions.
Stars: ✭ 2,628 (+2108.4%)
Mutual labels:  xcode, xcode-extension
Comment Spell Checker
Xcode extension for spell checking and auto-correcting code comments.
Stars: ✭ 155 (+30.25%)
Mutual labels:  xcode, xcode-extension
Swiftmockgeneratorforxcode
An Xcode extension (plugin) to generate Swift test doubles automatically.
Stars: ✭ 522 (+338.66%)
Mutual labels:  xcode, xcode-extension
Swiftai
SwiftAI, write Swift code smart. SwiftAI can generate Model class from JSON now. Codable and HandyJSON is supported. More features will be add.
Stars: ✭ 470 (+294.96%)
Mutual labels:  xcode, xcode-extension
Awesome Ios Interview
📲 The curated list of iOS Developer interview questions and answers, Swift & Objective-C
Stars: ✭ 753 (+532.77%)
Mutual labels:  xcode, developer-tools
Suitcase
A flexible command line tool for instantly deploying user interfaces for simple commands and scripts.
Stars: ✭ 1,287 (+981.51%)
Mutual labels:  xcode, developer-tools
Linex
Feature packed Xcode extension
Stars: ✭ 210 (+76.47%)
Mutual labels:  xcode, xcode-extension
Xcodeequatablegenerator
Xcode 8 Source Code Extension will generate conformance to Swift Equatable protocol based on type and fields selection.
Stars: ✭ 188 (+57.98%)
Mutual labels:  xcode, xcode-extension
Stylesync
A command line tool to extract shared styles from a Sketch document, and generate native code for any platform.
Stars: ✭ 382 (+221.01%)
Mutual labels:  xcode, developer-tools
Marathon
[DEPRECATED] Marathon makes it easy to write, run and manage your Swift scripts 🏃
Stars: ✭ 1,889 (+1487.39%)
Mutual labels:  xcode, developer-tools
Swimat
An Xcode formatter plug-in to format your swift code.
Stars: ✭ 1,388 (+1066.39%)
Mutual labels:  xcode, xcode-extension
Xcode developer disk images
Stars: ✭ 125 (+5.04%)
Mutual labels:  xcode, xcode-extension
Nef Plugin
🔌 an Xcode extension to use nef features easily
Stars: ✭ 144 (+21.01%)
Mutual labels:  xcode, xcode-extension
Import
Xcode extension for adding imports from anywhere in the code ☝️
Stars: ✭ 818 (+587.39%)
Mutual labels:  xcode, xcode-extension
Snowonder
🔮 Magical import declarations formatter for Xcode
Stars: ✭ 100 (-15.97%)
Mutual labels:  xcode, xcode-extension

AccessControlKitty

Xcode extension to change the access control level of Swift code selection

Download from the Mac App Storeversions have now diverged – this repo contains the latest fixes

Features

  • Works on selected Swift code to switch between public, private, fileprivate, internal or no access control modifier. Choose an option from the new Access Level of Selection item at the bottom of Xcode's Editor menu:
  • Increment access levels in selected code. So, private and fileprivate code becomes internal, internal becomes public, and any public code stays as is.
  • Decrement access levels. private code stays as is, fileprivate and internal become private, and public code becomes internal.
  • Create API – changes all internal code to public, exposing it as API for your framework
  • Remove API – similarly, changes all public code to be internal, removing its visibility as API
  • Set all appropriate access modifiers to one level
  • Remove access notation entirely
  • Setters with overriden access levels (for example, private(set) internal var) are treated separately: when incrementing/decrementing access, or making/removing API, overridden setters maintain their current access level. If the underlying entity ends up with the same access level as the overriden setter, the explicit override is removed. When setting code to a single access level, the explicit setter override is removed so the entire entity is set to the desired level.

Caveats

  • It’s not particularly smart, so for example it doesn’t know if a function can’t be made public because it relies on an internal type. Or if a subclass can't be made public because its superclass isn't public. And it certainly can't reason about anything going on in any other file. It just operates on the bits of selected Swift code that could, grammatically speaking, have an access control modifier.
  • It also doesn’t support open or final for the moment, mostly because it’s a bit more work and just ship it already, and partly because I sort of feel those notations should require a bit more forethought when planning a framework.
  • Next on the list are the (new I think) warnings in Swift 5 about redundant public declarations of top level members in public extensions. Work in progress, to come shortly 😅

To install:

Available to download now on the Mac App Storeversions have now diverged – this repo contains the latest fixes

The MAS and github versions are currently in sync woohoo! But if you want to install yourself:

  • Download the Xcode project
  • Archive the Mac app target
  • From the Organizer window, which should open automatically, click Distribute and export the created archive using the option Copy to use locally. Save wherever you like.
  • Launch the app
  • The extension will now be available in System Preferences, under the Extensions pane, listed as an Xcode Source Editor extension. Activate!
  • After an Xcode restart, find it under the Editor menu - it only works on selected Swift code
  • For even more radness, you can bind keyboard shortcuts to the menu commands

Bugs & feedback:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].