{"id":16685176,"url":"https://github.com/clayellis/codesnippets","last_synced_at":"2026-02-23T01:32:27.344Z","repository":{"id":80927155,"uuid":"92859074","full_name":"clayellis/CodeSnippets","owner":"clayellis","description":"👨🏻‍💻 Xcode code snippets that I use on a day-to-day basis. ","archived":false,"fork":false,"pushed_at":"2017-05-30T18:03:33.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-10T01:04:32.924Z","etag":null,"topics":["xcode"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clayellis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-05-30T17:33:56.000Z","updated_at":"2017-05-30T18:03:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"80b6653c-31eb-4639-9cb3-e1702b6a4961","html_url":"https://github.com/clayellis/CodeSnippets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clayellis/CodeSnippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayellis%2FCodeSnippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayellis%2FCodeSnippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayellis%2FCodeSnippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayellis%2FCodeSnippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clayellis","download_url":"https://codeload.github.com/clayellis/CodeSnippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clayellis%2FCodeSnippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29734468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["xcode"],"created_at":"2024-10-12T14:46:24.240Z","updated_at":"2026-02-23T01:32:27.334Z","avatar_url":"https://github.com/clayellis.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 👨🏻‍💻 CodeSnippets\nXcode code snippets that I use on a day-to-day basis. \n\n## Installation\n\n1. `git clone https://github.com/clayellis/CodeSnippets.git`\n2. `cp CodeSnippets/*.codesnippet ~/Library/Developer/Xcode/UserData/CodeSnippets/`\n3. Restart Xcode\n\n## Overview\n\n### localizable-strings.codesnippet\nWhen developing iOS apps, I like to put all of my user-facing strings into a `Localizable.strings` file to:\n1. Have a centralized location for editing strings\n2. Be able to translate the app quickly without having to change any code\n\nTo improve the process of adding strings to `Localizable.strings` I wrote a Swift script called [Localize](link) that parses files for `NSLocalizedString(...)` and pulls out the key, value, and comment if provided. I like providing all three by default. But since Xcode only code completes for `NSLocalizedString(_ key: String, comment: String)` it can be cumbersome to always add `value: String`. You could create a global function with those parameters, but I try to avoid adding global functions when possible.\n\nStart typing `NSLocalizableString` add get a nice completion for `NSLocalizedString(_ key: String, value: String, comment: String)` (which is a totally valid flavor of the macro.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayellis%2Fcodesnippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclayellis%2Fcodesnippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclayellis%2Fcodesnippets/lists"}