{"id":3259,"url":"https://github.com/Bouke/SwiftInitializerGenerator","last_synced_at":"2025-08-03T13:32:28.129Z","repository":{"id":144880658,"uuid":"67921642","full_name":"Bouke/SwiftInitializerGenerator","owner":"Bouke","description":"Xcode Source Code Extension to Generate Swift Initializers","archived":false,"fork":false,"pushed_at":"2019-08-13T05:41:04.000Z","size":1429,"stargazers_count":718,"open_issues_count":7,"forks_count":31,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-12T07:28:40.333Z","etag":null,"topics":["code-generator","swift","swift-initializer","xcode-extension"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bouke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-09-11T09:31:33.000Z","updated_at":"2024-08-12T20:31:37.000Z","dependencies_parsed_at":"2023-10-20T18:35:14.430Z","dependency_job_id":null,"html_url":"https://github.com/Bouke/SwiftInitializerGenerator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bouke%2FSwiftInitializerGenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bouke%2FSwiftInitializerGenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bouke%2FSwiftInitializerGenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bouke%2FSwiftInitializerGenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bouke","download_url":"https://codeload.github.com/Bouke/SwiftInitializerGenerator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228548567,"owners_count":17935221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-generator","swift","swift-initializer","xcode-extension"],"created_at":"2024-01-05T20:16:36.021Z","updated_at":"2024-12-07T01:30:46.673Z","avatar_url":"https://github.com/Bouke.png","language":"Swift","readme":"Swift Initializer Generator\n===========================\n\nThis Xcode Source Code Extension will generate a Swift initializer based on the lines you've selected. Handy if you made a struct public and now you have to provide the initializer implementation yourself.\n\nUsage\n-----\n\nSelect the lines with the attributes that should be included in the initializer. See below; ``\u003e`` is the start of the selection and ``\u003c`` is the end of the selection.\n```swift\nstruct MyStruct {\n\u003e    public var a: String\n    public var b: Int\u003c\n}\n```\nRun the extension's \"Generate Swift Initializer\". Voila! The code above is modified to:\n```swift\nstruct MyStruct {\n    public var a: String\n    public var b: Int\n    public init(a: String, b: Int) {\n        self.a = a\n        self.b = b\n    }\n}\n```\n![Demo](docs/demo.gif)\n\nInstallation\n------------\n\n1. On OS X 10.11 El Capitan, run the following command and restart your Mac:\n\n        sudo /usr/libexec/xpccachectl\n\n1. Open ``SwiftInitializerGenerator.xcodeproj``\n1. Enable target signing for both the Application and the Source Code Extension using your own developer ID\n1. Product \u003e Archive\n1. Right click archive \u003e Show in Finder\n1. Right click archive \u003e Show Package Contents\n1. Drag ``Swift Initializer Generator.app`` to your Applications folder\n1. Run ``Swift Initializer Generator.app`` and exit again.\n1. Go to System Preferences -\u003e Extensions -\u003e Xcode Source Editor and enable the extension\n1. The menu-item should now be available from Xcode's Editor menu.\n\nKnown limitations\n-----------------\n\nIt will only parse attributes defined like ``(open|public|fileprivate|private|internal) [weak] (var|let) NAME: TYPE``.\n","funding_links":[],"categories":["Xcode","WebSocket","The list"],"sub_categories":["Extensions","Other free courses","Extensions (Xcode 8+)","Typed Boilerplate Code Generators"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBouke%2FSwiftInitializerGenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBouke%2FSwiftInitializerGenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBouke%2FSwiftInitializerGenerator/lists"}