A Xcode Source Editor Extension to quickly add a method implementation with comment from selected text
Xcode was lacking a way to quickly add a method. So I created it.
- download the Quick Add app
- unzip and copy to Applications folder
- Run (right click + open)
- System Preferences ⇒ Extensions ⇒ All ⇒ QuickAddPlugin. (See image 1 below.)
- System Preferences ⇒ Keyboard ⇒ Shortcuts. Add Shortcut
⌥⌘i
forAdd method with comment
. (See image 2 below.) - open Xcode
- Select any Swift source file
- check if
Editor -> Quick Add
is there
- Download and unzip the project.
- Open "Add Method.xcodeproj".
- Enable target signing for both the Application and the Source Code Extension.
- Product > Archive.
- Right click archive > Show in Finder.
- Right click archive > Show Package Contents.
- Open Products, Applications.
- Drag Add Method.app to Applications folder.
- Run Add Method.app and exit.
- Go to System Preferences -> Extensions -> Xcode Source Editor and enable this extension.
- The menu-item should now be available from Xcode's Editor menu.
Select the text you want to add an method implementation of, press ⌥⌘i
and presto! A full method implementation!
- Swift (for now)