Help us understand the problem. What is going on with this article?

XCodeに登録したCodeSnippetの保存場所と内容

More than 5 years have passed since last update.

保存場所
~/Library/Developer/Xcode/UserData/CodeSnippets/
この下に、*.codesnippet というファイルで保存されていました。

内容

*codesnippet
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>IDECodeSnippetCompletionPrefix</key>
    <string>log</string>
    <key>IDECodeSnippetCompletionScopes</key>
    <array>
        <string>CodeBlock</string>
    </array>
    <key>IDECodeSnippetContents</key>
    <string>NSLog(@"CGPoint: %@", NSStringFromCGPoint(&lt;#point#&gt;)); </string>
    <key>IDECodeSnippetIdentifier</key>
    <string>083C94B4-147D-471B-A4AB-A0F182A79301</string>
    <key>IDECodeSnippetLanguage</key>
    <string>Xcode.SourceCodeLanguage.Objective-C</string>
    <key>IDECodeSnippetSummary</key>
    <string>NSLog(@"CGPoint: %@", NSStringFromCGPoint(&lt;#point#&gt;)); </string>
    <key>IDECodeSnippetTitle</key>
    <string>log CGPoint主力</string>
    <key>IDECodeSnippetUserSnippet</key>
    <true/>
    <key>IDECodeSnippetVersion</key>
    <integer>0</integer>
</dict>
</plist>

ファイル名やIDECodeSnippetIdentifierに、ちょっと怖いidがあるのだけど、このディレクトリを共有しておけば、別のMacでも使い回しができるようです。

参考
Xcode: NSLog() の入力が捗る Code Snippet
Xcode 4のスニペットをDropboxで同期する

paming
Android修行中
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away