Giter VIP home page Giter VIP logo

swiftinitgenerator's Introduction

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.

swiftinitgenerator's People

Contributors

atimca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

chouti-dev

swiftinitgenerator's Issues

App Crashed at the start

macOS 10.14.6 (18G87)
Xcode Version 10.3 (10G8)

App crashes after launch.

Crashed Thread:        0

Exception Type:        EXC_CRASH (Code Signature Invalid)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x1

Don't accept Access control

Hi, first, thanks for your extension, it's great and you're doing a good job !
But, it's very sad that your extension don't take into account the keyword (set) for access control on varaibles.
private(set) var nom: String
private(set) var desc: String
private(set) var latitude: Double

Will get
public init() { }

Instead of
public init(nom: String, desc: String) {
self.nom = nom
self.desc = desc
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.