{"id":20504466,"url":"https://github.com/tiknil/xcode-snippets","last_synced_at":"2026-02-17T19:35:15.095Z","repository":{"id":41075221,"uuid":"45791436","full_name":"tiknil/xcode-snippets","owner":"tiknil","description":"Xcode Snippets useful for use the same Obj-C/Swift style and do some procedures faster","archived":false,"fork":false,"pushed_at":"2022-01-31T11:11:48.000Z","size":6897,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-06T01:21:17.678Z","etag":null,"topics":[],"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/tiknil.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}},"created_at":"2015-11-08T17:47:30.000Z","updated_at":"2023-04-13T14:48:23.000Z","dependencies_parsed_at":"2022-08-29T07:33:14.176Z","dependency_job_id":null,"html_url":"https://github.com/tiknil/xcode-snippets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tiknil/xcode-snippets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiknil%2Fxcode-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiknil%2Fxcode-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiknil%2Fxcode-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiknil%2Fxcode-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiknil","download_url":"https://codeload.github.com/tiknil/xcode-snippets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiknil%2Fxcode-snippets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29555449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T18:16:07.221Z","status":"ssl_error","status_checked_at":"2026-02-17T18:16:04.782Z","response_time":100,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-15T19:38:11.199Z","updated_at":"2026-02-17T19:35:10.084Z","avatar_url":"https://github.com/tiknil.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xcode snippets\n\nSnippets di codice Obj-C e Swift per lo sviluppo iOS e OSX utili per migliorare il tuo lavoro in termini di velocità ma anche di qualità del codice. (Vedi la [Swift Style Guide di Tiknil](https://github.com/tiknil/swift-style-guide))\n\n## Come tenerli aggiornati su XCode? ##\n\n#### Link simbolico e repo locale ####\n\nPullare il repo e impostare i riferimenti simbolici alla cartella corretta, in questo modo: \n * Pullare il presente repository (o meglio una vostra fork + pull, così potrete fare delle pull request se avrete snippets interessanti!) in una vostra cartella (da ora `$XCODE_SNIPPETS_FOLDER`)\n * Fare una copia di backup del contenuto della cartella `~/Library/Developer/Xcode/UserData/CodeSnippets` sul vostro mac: sono tutti i vostri snippets creati finora, se è vuota, meglio così!\n * Eliminate la cartella\n * Da Terminale eseguite il comando \n\n`ln -s $XCODE_SNIPPETS_FOLDER/snippets ~/Library/Developer/Xcode/UserData/CodeSnippets` \n\n   così da creare un link simbolico tra il vostro repo e la cartella dove XCode si aspetta di trovare i vostri snippets\n * Potete anche copiare nella cartella del repo gli snippets di cui avete fatto il backup\n * Chiudete e riaprite XCode e i vostri snippets dovrebbero trovarsi già lì\n\n## Snippets ##\n\n#### `def` ####\n\nQuesto snippet è molto comodo per organizzare il codice di implementazione delle classi in modo coerente. Basta cominciare a digitare `def` e lo snippet proporrà i `// MARK: ` per raggruppare il codice in maniera ordinata\n\n![def code snippet swift](https://github.com/tiknil/xcode-snippets/blob/master/images/def_code_snippet_swift.gif)\n\n#### `com`... ####\n\nQuesto gruppo di snippet (`comblank`, `comfull`, `comparam` e `comreturn`) sono tutti relativi ai commenti delle dichiarazioni dei metodi (e non solo).\nEssi predispongono i caratteri che servono a far identificare i commenti all'IDE ma con anche i campi `@param`/`- Parameter :` e `@return`/`- Returns:` con i relativi *placeholder* in modo tale da velocizzare l'inserimento e guidarlo nella maniera corretta\n\n![com code snippets swift](https://github.com/tiknil/xcode-snippets/blob/master/images/com_code_snippet_swift.gif)\n\n\n#### `wea` e `guardself` ####\n\nPer utilizzare `self` all'interno dei blocchi è utile usare gli snippet `wea` (che genera il codice `[weak self]`) e `guardself` (che genera il codice `guard let self = self else { return }`) da utilizzare all'inizio dei blocchi per non incorrere a leak dell'istanza stessa. \n\n![wea_guardself_snippets](https://github.com/tiknil/xcode-snippets/blob/master/images/wea_guardself_snippet.gif)\n\n\n### Rx snippet ###\n\n#### `obse` ####\n\nQuesto snippet crea il codice necessario per costruire un observable con tanto di gestione dei potenziali leak dell'istanza \n\n![obse_snippets](https://github.com/tiknil/xcode-snippets/blob/master/images/obse_snippet.gif)\n\n#### `guardselfrx` ####\n\nQuesto snippet è un'evoluzione dei precedenti in quanto viene usato all'interno delle funzioni che creano un Completable, Single o Maybe.\n\n![guardselfrx_snippets](https://github.com/tiknil/xcode-snippets/blob/master/images/guardselfrx_snippet.gif)\n\n\n### MVVM Tiknil pattern snippet ###\n\n#### `vc` ####\n\nQuesto snippet crea il boilerplate di un viewcontroller adeguato per il pattern mvvm Tiknil, con i placeholder dove inserire il nome della view che si sta realizzando\n\n![vc_snippets](https://github.com/tiknil/xcode-snippets/blob/master/images/vc_snippet.gif)\n\n\n#### `vm` ####\n\nQuesto snippet crea il boilerplate di un viewmodel adeguato per il pattern mvvm Tiknil, con i placeholder dove inserire il nome del viewmodel che si sta realizzando\n\n![vm_snippets](https://github.com/tiknil/xcode-snippets/blob/master/images/vm_snippet.gif)\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiknil%2Fxcode-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiknil%2Fxcode-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiknil%2Fxcode-snippets/lists"}