Xcode provides you with ability of using variables which is usually referenced as Tokens in the Apple's Documentation. As always when you define a variable you should use the standard syntax for the code variables in Snippets. 

You can drag a snippet from the Code Snippet library into a source file. Or, for maximum efficiency, type a snippet shortcut in the text of your source code, then press Esc and then Return to enter the snippet. In most cases, when you begin typing the snippet’s completion shortcut, Xcode suggests it, so you need only accept it by pressing Return. Both standard and custom code snippets support completion shortcuts.

Restarting Xcode

Please note that every time you make changes on any snippet that should be distributed to Xcode you have to restart it in order to make them available. When you enable Distributor for Xcode you should restart it as well. 

Update: With Distributor for Xcode 2.0 and later you don't have to restart Xcode anymore.

Release notes

  • 1.0
    • Initial release
  • 2.0
    • Added Xcode Helper plugin that reloads changes automatically while Xcode is running without restarting it. 
  • 2.1 
    • Quick fix. When you delete file, it was not removed from Xcode.
  • 2.2
    • Fixed issue with code formatting when no code variables defined
  • 2.3
  • 2.4
    • Xcode 5 supported.
  • 2.5
    • Fixed issue with variables when snippet reused with Snippets Assistant or Global Search
  • 2.6
    • Xcode 5.1 Supported
  • 2.7
    • Xcode 6.0 and 6.1 Supported