/SwiftInitGenerator

Primary LanguageSwiftMIT LicenseMIT

Swift Init Generator

Swift 5 atimca

Swift Init Generator is an Xcode Source Editor extension that makes it easy to generate your init, especially for public types.

Features

  • ⚒ No longer hack your Xcode to install custom plugins.
  • 📃 Generate Init from any selected variables, filter static, computed and etc.

Examples

Generation From The Selected Lines

Swift Init Generator - Example

Installation

Option 1:

  • Download latest SwiftInitGenerator package from the Releases.
  • Copy SwiftInitGenerator to your Applications folder.
  • Launch SwiftInitGenerator once. You can close it immediately afterwards.
  • Go to System Preferences > Extensions > Xcode Source Editor > select Swift Init Generator

Swift Init Generator - Installation

If you have this alert:

“SwiftInitGenerator” can’t be opened because Apple cannot check it for malicious software. malicious

Please watch this video for instruction steps: video

Option 2:

  • Just download source code and build it on your machine😉

Setting Hotkey in Xcode

  • Open Xcode
  • Go to Xcode > Preferences > Key Bindings
  • Type 'Swift Init Generator' in search field
  • Assign + + + I to Generate Init From Selected Lines

Swift Init Generator - Hotkeys

Feedback

Pull requests, issues and suggestions are warmly welcome.