{"id":16061645,"url":"https://github.com/josefdolezal/xcode-goodies","last_synced_at":"2026-01-19T02:33:07.276Z","repository":{"id":85856881,"uuid":"86252704","full_name":"josefdolezal/xcode-goodies","owner":"josefdolezal","description":"🚀 Goodies for Xcode IDE - templates, keyboard shortcuts and tips for quick iOS development","archived":false,"fork":false,"pushed_at":"2017-04-22T12:11:03.000Z","size":43,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T09:14:24.904Z","etag":null,"topics":["goodies","ios","xcode","xcode-templates","xcode8"],"latest_commit_sha":null,"homepage":"","language":null,"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/josefdolezal.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-26T17:51:13.000Z","updated_at":"2022-05-16T02:36:16.000Z","dependencies_parsed_at":"2023-03-13T07:03:36.071Z","dependency_job_id":null,"html_url":"https://github.com/josefdolezal/xcode-goodies","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/josefdolezal/xcode-goodies","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josefdolezal%2Fxcode-goodies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josefdolezal%2Fxcode-goodies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josefdolezal%2Fxcode-goodies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josefdolezal%2Fxcode-goodies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josefdolezal","download_url":"https://codeload.github.com/josefdolezal/xcode-goodies/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josefdolezal%2Fxcode-goodies/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28558236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["goodies","ios","xcode","xcode-templates","xcode8"],"created_at":"2024-10-09T04:09:33.436Z","updated_at":"2026-01-19T02:33:07.250Z","avatar_url":"https://github.com/josefdolezal.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xcode goodies\n\n## Content\n* [Templates](#templates)\n* [Snippets](#snippets)\n* [Keyboard shortcuts](#keyboard-shortcuts)\n\n## Templates\nBy default, Xcode supports only Apple MVC templates.\nThis leads to terrible inconsistency in app layers when you use different architecture.\nAlso, a lot of boilerplate code must be deleted, some must be added.\nBecause of that, I decided to create MVVM friendly templates.\nThe MVVM style is heavily inspired by [Kickstarter's iOS App](https://github.com/kickstarter/ios-oss).\nThat means, all View Models are composed from `inputs` and `outputs` and implements `Type` protocol. All Controllers created with MVVM template requires ViewModel class.\n\nAll templates are separated in to sections with `MARK: - ` comments.\nThis creates fine document outline when you press \u003ckbd\u003ectrl ^\u003c/kbd\u003e + \u003ckbd\u003e6\u003c/kbd\u003e.\n\nCurrently, this repository contains templates for:\n* [View Controller](templates/View%20Controller.xctemplate/___FILEBASENAME___.swift)\n* [View Model](templates/View%20Model.xctemplate/___FILEBASENAME___.swift)\n* [Realm Object](templates/Realm%20Object.xctemplate/___FILEBASENAME___.swift)\n* [Quick Spec](templates/Quick%20Spec.xctemplate/___FILEBASENAME___.swift)\n* [Cell View](templates/Cell%20View.xctemplate/___FILEBASENAME___.swift)\n\n### Installation\nTemplates are located in user's Library folder where Xcode keeps custom configuration.\nTo install templates, just copy them to correct location.\nHowever, better way to stay up-to date with latest repo version is to create symbolic link for whole templates folder.\n\nFirst of all, clone this repository:\n```bash\n$ git clone https://github.com/josefdolezal/xcode-goodies\n```\n\nOnce the repository is clonned, create the symbolic link:\n```bash\n$ TEMPLATES_GROUP=\"\u003cMy templates\u003e\"\n$ cd xcode-goodies # Switch to the repository\n$ ln -s \"$PWD\" ~/Library/Developer/Xcode/Templates/\"$TEMPLATES_GROUP\"\n```\n\nBe sure you replaced `\u003cMy templates\u003e` placeholder with group name you want to see in Xcode.\nIf everything went right, you should see new section at the bottom of the list when you press \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003en\u003c/kbd\u003e.\n\n## Snippets\nSimilary as templates, Xcode supports custom code snippets.\nA lot of standard snippets are included in base Xcode installation, however it's not enough!\nDo you remember this few lines of code you have to write whenever you want to disable Swiftlint here and then enable it somewhere else again?\nDoes it take you at least second try to write correct syntax of `Localizable.strings`?\nOh, and did I mention the Realm API which is not suggested by Xcode because it's implemented with static methods?\nCustom snippets are here for rescue!\nSee the list below and choose your favorite.\n\n### List of custom snippets\n\n#### ReactiveSwift \u0026 ReactiveCocoa\n\n* [RAC disposable definition](snippets/9C88A28C-DB25-421B-A846-9C4E3E867427.codesnippet)\n\n#### Realm\n\n* [Realm dynamic var declaration](snippets/45DCE6A4-72B7-4D46-AFF1-8645C11CB1EC.codesnippet)\n* [Realm API - Ignored properties](snippets/99FB3AAE-7B4C-4484-B134-C8AF41D7D536.codesnippet)\n* [Realm API - Primary key](snippets/002300FE-9FCC-4F1C-95F2-2AEF03E11219.codesnippet)\n\n#### Swiftlint\n\n* [Disable Swiftlint validation rule with](snippets/0B1E7716-5498-493A-99AB-86BFD0150AFD.codesnippet)\n* [Enable Swiftlint validation rule](snippets/05A22B9F-CCE6-4E60-9E42-C242134B2493.codesnippet)\n\n#### Localizable strings file\n\n* [Create translation key-value pair](snippets/0CAD2970-EF19-4B08-A448-405FB8D956E5.codesnippet)\n\n### Installation\nThe installation is alson done with symlinks, but snippets does not support subfolders.\nSnippets must be linked separately:\n\n```bash\n$ cd xcode-goodies/snippets # Switch to the repository\n$ ln -s \"$PWD\"/*.codesnippet ~/Library/Developer/Xcode/UserData/CodeSnippet\n```\n\nNote that if you have your own snippets already, there may be some name conflicts during installation.\nIn that case, rename the conflicted files (your or these in repository) and run the installation script again.\n\nTo see the effect, **restart the Xcode**.\n\n## Keyboard shortcuts\n\n#### Scheme / Target / Product\n| Effect                                 | Shortcut                                                                                                       |\n|----------------------------------------|----------------------------------------------------------------------------------------------------------------|\n| Switch build scheme                    | \u003ckbd\u003ectrl ^\u003c/kbd\u003e + \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003e[\u003c/kbd\u003e **or** \u003ckbd\u003ectrl ^\u003c/kbd\u003e + \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003e]\u003c/kbd\u003e |\n| Switch product destination (simulator) | \u003ckbd\u003ectrl ^\u003c/kbd\u003e + \u003ckbd\u003ealt ⎇\u003c/kbd\u003e + \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003e[\u003c/kbd\u003e **or** \u003ckbd\u003ectrl ^\u003c/kbd\u003e + \u003ckbd\u003ealt ⎇\u003c/kbd\u003e + \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003e]\u003c/kbd\u003e |\n\n#### Editor focus\n| Effect                         | Shortcut                                                                                                         |\n|--------------------------------|------------------------------------------------------------------------------------------------------------------|\n| Move focus to different editor | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003ej\u003c/kbd\u003e                                                                                  |\n| Open assistant editor *        | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003ealt ⎇\u003c/kbd\u003e + \u003ckbd\u003eenter ↩\u003c/kbd\u003e                                                         |\n| Close assistant editor         | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003eenter ↩\u003c/kbd\u003e                                                                             |\n| Switch tab                     | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003eshift ⬆\u003c/kbd\u003e + \u003ckbd\u003e[\u003c/kbd\u003e **or** \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003eshift ⬆\u003c/kbd\u003e + \u003ckbd\u003e]\u003c/kbd\u003e |\n| Open new tab                   | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003et\u003c/kbd\u003e                                                                                   |\n\n\\* Don't forget to check *Use Focused Editor* in Xcode *Navigation* preferences, or each new file will be opened in the standard editor every time.\n\n#### Source code editing\n| Effect              | Shortcut                                                     |\n|---------------------|--------------------------------------------------------------|\n| Open quickly        | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003eshift ⬆\u003c/kbd\u003e + \u003ckbd\u003eo\u003c/kbd\u003e        |\n| Show completions    | \u003ckbd\u003ectrl ^\u003c/kbd\u003e + \u003ckbd\u003espace\u003c/kbd\u003e **or** \u003ckbd\u003eesc\u003c/kbd\u003e\\* |\n| Re-indent selection | \u003ckbd\u003ectrl ^\u003c/kbd\u003e + \u003ckbd\u003ei\u003c/kbd\u003e                             |\n\n\\* Must be turned on explicitly in *Text Editing* under *Code completions* options.\n\n#### Editor navigation\n| Effect                            | Shortcut                         |\n|-----------------------------------|----------------------------------|\n| Move to the beginning of the line | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003e←\u003c/kbd\u003e |\n| Move to the end of the line       | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003e➡\u003c/kbd\u003e  |\n| Move to the beginning of the word | \u003ckbd\u003ealt ⎇\u003c/kbd\u003e + \u003ckbd\u003e←\u003c/kbd\u003e |\n| Move to the end of the word       | \u003ckbd\u003ealt ⎇\u003c/kbd\u003e + \u003ckbd\u003e➡\u003c/kbd\u003e |\n| File outline                      | \u003ckbd\u003ectrl ^\u003c/kbd\u003e + \u003ckbd\u003e6\u003c/kbd\u003e |\n\nLine navigation may be also combined with \u003ckbd\u003ebackspace ⬅\u003c/kbd\u003e to achieve ultimate deletion combos.\n\n#### Editor commands\n| Effect                | Shortcut                                                                 |\n|-----------------------|--------------------------------------------------------------------------|\n| Build target          | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003eb\u003c/kbd\u003e                                          |\n| Run product           | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003er\u003c/kbd\u003e                                          |\n| Run all tests         | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003er\u003c/kbd\u003e                                          |\n| Run current test      | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003ectrl ^\u003c/kbd\u003e + \u003ckbd\u003ealt ⎇\u003c/kbd\u003e + \u003ckbd\u003eu\u003c/kbd\u003e   |\n| Clean project         | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003eshift ⬆\u003c/kbd\u003e + \u003ckbd\u003ek\u003c/kbd\u003e                     |\n| Clean build folder    | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003ealt ⎇\u003c/kbd\u003e + \u003ckbd\u003eshift ⬆\u003c/kbd\u003e + \u003ckbd\u003ek\u003c/kbd\u003e |\n\n#### Editor layout\n| Effect                | Shortcut                                         |\n|-------------------|------------------------------------------------------|\n| Toggle console   | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003eshift ⬆\u003c/kbd\u003e + \u003ckbd\u003ey\u003c/kbd\u003e |\n| Toggle navigator | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003e0\u003c/kbd\u003e                       |\n| Toggle utilities | \u003ckbd\u003ecmd ⌘\u003c/kbd\u003e + \u003ckbd\u003ealt ⎇\u003c/kbd\u003e + \u003ckbd\u003e0\u003c/kbd\u003e   |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosefdolezal%2Fxcode-goodies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosefdolezal%2Fxcode-goodies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosefdolezal%2Fxcode-goodies/lists"}