How to create custom text macros in Xcode 4?

I upgraded to Xcode 4 today and my custom text macros no longer work. I cannot find information on how to use custom macros with Xcode 4. Is this possible? Please let me know if anyone comes up with a solution.

This is the directory in which I have the file 'ObjectiveC.xctxtmacro'. ~ / Library / Application Support / Developer / General / Xcode / Specifications

+5
source share
1 answer

The format of how text macros are defined and where they live is text macros turned into code fragments.

, ( , ), () .

, , - :

~/Library/Developer/XCode/UserData/CodeSnippets

:

E4B300B5-E0EA-4E46-9963-6E9B2111E578.codesnippet

, UUID - "MyTest.codesnippet", XCode .

, ( .xctxtmacro ), , ( ). "<" / " > " , XML-safe &lt;/&gt;, XML-. , , NSLog(@"Hello Nurse: %@", Thing );, "":

<?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>nurse</string>
    <key>IDECodeSnippetCompletionScopes</key>
    <array>
        <string>All</string>
    </array>
    <key>IDECodeSnippetContents</key>
    <string>NSLog(@"Hello Nurse %@", &lt;#Thing#&gt;);
</string>
    <key>IDECodeSnippetIdentifier</key>
    <string>E4B300B5-E0EA-4E46-9963-6E9B2111E579</string>
    <key>IDECodeSnippetLanguage</key>
    <string>Xcode.SourceCodeLanguage.Objective-C</string>
    <key>IDECodeSnippetTitle</key>
    <string>TestNurse</string>
    <key>IDECodeSnippetUserSnippet</key>
    <true/>
    <key>IDECodeSnippetVersion</key>
    <integer>2</integer>
</dict>
</plist>

, , , , , , ( ! # <#!ReplaceParam!#>) - , . .

+11

All Articles