A collection of often used code snippets for internal use with Xcode, reflecting latest trends and recommendations for writing Swift code.
Follow these steps to copy the code snippets from this repo to your Xcode.
- Download the repo zip file.
- Navigate to downloaded folder in Terminal.
- Run shell script using command:
sudo sh script.sh
- Restart Xcode so that the changes take effect.
If you want to add or edit a snippet, please follow these conventions:
- Prefix the snippet title with XS followed with the snippet name in (XS Snippet Name).
- Prefix the snippet autocompletion keyword with xs followed with the keyword(xsSnippetKeyword).
- Please use a descriptive title and write a snippet summary so that other users know what your snippet does.
- Select the chunk of code you want to turn into a snippet in the Xcode editor.
- Open the Snippets section in the Utilities tab in Xcode.
- Drag your selected code to the snippets section.
- Fill out the fields in the resulting popup.
If you want to add a placeholder bubble in the snipped code, use <#placeholder#>.