<p>I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm.</p>

<p>One thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the coding tools such as refactorings and completion etc and as far as I can tell Xcode has some fairly limited built in support for this stuff.</p>

<p>On that note, does anyone know if any add-ins or whatever are available for the Xcode environment which add coding helpers such as automatically generating implementation skeletons from a class interface definition etc? </p>

<p>I suspect there aren't but I suppose it can't help to ask.</p>

[{'answer_id': 21019, 'author': 'Chris Hanson', 'author_id': 714, 'author_profile': 'https://Stackoverflow.com/users/714', 'pm_score': 3, 'selected': False, 'text': '<p>Xcode has refactoring for C and Objective-C built in.  Just select what you\'d like to refactor, choose "Refactor..." from either the menu bar or the contextual menu, and you\'ll get a window including the available refactorings and a preview area.</p>\n\n<p>Xcode doesn\'t currently have a public plug-in API; if there are specific types of plug-ins you\'d like Apple to enable, file enhancement requests in the <a href="http://bugreport.apple.com/" rel="nofollow noreferrer" title="Bug Reporter - it&#39;s not just for bugs!">Bug Reporter</a>.  That way Apple can count and track such requests.</p>\n\n<p>However, there are third-party tools like <a href="http://www.kevincallahan.org/software/accessorizer.html" rel="nofollow noreferrer" title="Accessorizer">Accessorizer</a> and <a href="http://rentzsch.com/code/mogenerator" rel="nofollow noreferrer" title="mogenerator: Core Data codegen"><code>mogenerator</code></a> (the latest release is <a href="http://rentzsch.com/code/mogenerator_v1.10" rel="nofollow noreferrer" title="mogenerator 1.10"><code>mogenerator 1.10</code></a>) that you can use to make various development tasks faster.  Accessorizer helps you create accessor methods for your classes, while <code>mogenerator</code> does more advanced code generation for Core Data managed object classes that are modeled using Xcode\'s modeling tools.</p>\n'}, {'answer_id': 21106, 'author': 'Benjamin Pollack', 'author_id': 2354, 'author_profile': 'https://Stackoverflow.com/users/2354', 'pm_score': 6, 'selected': True, 'text': '<p>You sound as if you\'re looking for three major things: code templates, refactoring tools, and auto-completion.</p>\n\n<p>The good news is that Xcode 3 and later come with superb auto-completion and template support.  By default, you have to explicitly request completion by hitting the escape key.  (This actually works in all <code>NSTextView</code>s; try it!)  If you want to have the completions appear automatically, you can go to <strong>Preferences</strong> -> <strong>Code Sense</strong> and set the pop-up to appear automatically after a few seconds.  You should find good completions for C and Objective-C code, and pretty good completions for C++.</p>\n\n<p>Xcode also has a solid template/skeleton system that you can use.  You can see what templates are available by default by going to Edit -> Insert Text Macro.  Of course, you don\'t want to insert text macros with the mouse; that defeats the point.  Instead, you have two options:</p>\n\n<ol>\n<li>Back in <strong>Preferences</strong>,go to <strong>Key Bindings</strong>, and then, under <strong>Menu Key Bindings</strong>, assign a specific shortcut to macros you use often.  I personally don\'t bother doing this, but I know plenty of great Mac devs who do</li>\n<li><p>Use the <code>CompletionPrefix</code>.  By default, nearly all of the templates have a special prefix that, if you type and then hit the escape key, will result in the template being inserted.  You can use Control-/ to move between the completion fields.</p>\n\n<p>You can see <a href="http://crookedspin.com/2005/06/10/xcode-macros/" rel="noreferrer">a full list of Xcode\'s default macros and their associated <code>CompletionPrefix</code>es</a> at <a href="http://crookedspin.com" rel="noreferrer">Crooked Spin</a>.</p>\n\n<p>You can also add your own macros, or modify the defaults.  To do so, edit the file <code>/Developer/Library/Xcode/Specifications/{C,HTML}.xctxtmacro</code>.  The syntax should be self-explanatory, if not terribly friendly.</p></li>\n</ol>\n\n<p>Unfortunately, if you\'re addicted to R#, you will be disappointed by your refactoring options.  Basic refactoring is provided within Xcode through the context menu or by hitting Shift-Apple-J.  From there, you can extract and rename methods, promote and demote them through the class hierarchy, and a few other common operations.  Unfortunately, neither Xcode nor any third-party utilities offer anything approaching Resharper, so on that front, you\'re currently out of luck.  Thankfully, Apple has already demonstrated versions of Xcode in the works that have vastly improved refactoring capabilities, so hopefully you won\'t have to wait too long before the situation starts to improve.</p>\n'}, {'answer_id': 562810, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>Just so people know, <a href="http://www.kevincallahan.org/software/accessorizer.html" rel="nofollow noreferrer">Accessorizer</a> does more than just generate accessors (both 1.0 and properties for 2.0) it also generates Core Data code for persisting non-standard attributes, your NSSet accessors for custom to-many relationships.</p>\n\n<p>In fact, <a href="http://www.kevincallahan.org/software/accessorizer.html" rel="nofollow noreferrer">Accessorizer</a> will help provide you with the init, keypath, keyed-archiving, indexed accessors, accessors for unordered collections such as NSSet, copyWithZone, KVO, key-validation, singleton overrides, dealloc, setNilForKey, non-standard attribute persistence (Core Data), locking, headerdoc, convert method to selector, NSUndoManager methods and more.</p>\n'}, {'answer_id': 4444825, 'author': 'Igor Pchelko', 'author_id': 425707, 'author_profile': 'https://Stackoverflow.com/users/425707', 'pm_score': 0, 'selected': False, 'text': '<p>I found some xtmacro files in Xcode.app package:\n<strong>/Developer/Applications/Xcode.app/Contents/PlugIns/TextMacros.xctxtmacro/Contents/Resources</strong></p>\n\n<p>Installed Xcode ver. 3.2.5.</p>\n'}, {'answer_id': 5624722, 'author': 'John Gallagher', 'author_id': 60131, 'author_profile': 'https://Stackoverflow.com/users/60131', 'pm_score': 5, 'selected': False, 'text': '<p>I\'m excited to say that JetBrains have decided to make a decent IDE for Objective-C coders. </p>\n\n<p>It\'s called <strong>AppCode</strong> and it\'s based on their other tools like RubyMine and Resharper. It\'s not native Cocoa, but has loads of raw refactoring power.</p>\n\n<p><a href="http://www.jetbrains.com/objc/index.html" rel="noreferrer">http://www.jetbrains.com/objc/index.html</a></p>\n\n<p>I\'ve started using it for my main Objective C project and I\'m already in love. It\'s still in it\'s infancy, but for code editing and refactoring it already blows Xcode away.</p>\n\n<p><strong>Update</strong></p>\n\n<p>It\'s now at a totally usable speed. I\'ve switched over to it full time and it still blows my mind how amazing refactoring and coding is compared with Xcode. It just handles so much for you - auto importing, almost infinite customisation. It makes Xcode look like a toy.</p>\n'}]
['https://Stackoverflow.com/questions/20420', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1120/']