Are there any tools out there for Objective-C / Xcode? Something that can do one or more of the following:
- Detect unused imports
- Auto-synthesize properties
- Autogenerate dealloc method from retained properties
- Provide method stubs for interface
Are there any tools out there for Objective-C / Xcode? Something that can do one or more of the following:
You could probably do something with AppleScript or another scripting language, called via AppleScript, to operate on method or header files.
You want to look at Kevin Callahan's Accessorizer, which can do several of the things you request and more. The Google Toolbox for Mac also includes an Xcode plugin that can remove whitespace and a few other things.
-Detect unused imports
Not sure of anything that checks for dead imports.
-Auto-synthesize properties *-Autogenerate dealloc method from retained properties*
User Scripts work quite well to do this inside Xcode, you can also use a program like Acessorizer as mentioned but it pastes something onto the clipboard for you to paste.
-Provide method stubs for interface
type "init" just after @implementation
, and type Control-. (period).
These are user macros (not scripts), and you can easily define your own. Note they have placeholders that you can use tab to jump to the bits to fill in.
If you want static analysis, Clang is built in to all recent releases. None of what you've described has anything to do with static analysis, however.