15

I am aware of the method of making them warnings, but I want to keep my legit warnings separate from my todos. I'm also have yet to see xcode 4 highlight the todos like everyone seems to think it does. And xcode's todo support only works on todos outside of functions...

The build phase script that is outlined here is wonderful, but it makes the TODOs into warnings, and Objective C creates enough legitimate warnings that I don't want my todo's clogging up the list. Is there a way to make the todo's a different build result, like an info result or something? Something that will not make Xcode's real warnings (half of should be errors) vanish in the crowd?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Tustin2121
  • 2,058
  • 2
  • 25
  • 38
  • 1
    Has your question been answered to your satisfaction? If so you might want to accept an answer or if not, update your question or add some comments. – Richard Stelling Mar 08 '12 at 09:41

2 Answers2

20

UPDATE

As of Xcode 4.4; FIXME:, ???:, ????:, !!!: all work outside of a function/method.

ORIGINAL ANSWER (< Xcode 4.4)

will highlight a TODO but only outside of a function.

//TODO: This will show in function drop down 
-(void)method1
{
    //TODO: This will not show
}

In addition; FIXME, ???, ????, !!!! do the same.

TODO

Community
  • 1
  • 1
Richard Stelling
  • 25,607
  • 27
  • 108
  • 188
  • 1
    Ah, this makes sense as to why my TODOs, which I always put INSIDE the functions, never showed up. Well, that's dumb... :/ Thanks for this. – Tustin2121 Feb 27 '12 at 20:48
  • 1. In my Xcode 4.6, they work even *inside* of a function. 2. Only three exclamation marks (`!!!`) are needed, instead of four. 3. `MARK` also works. 4. The colon is compulsory. See http://lists.apple.com/archives/xcode-users/2010/Apr/msg00360.html – Pang May 06 '13 at 01:21
4

One way is to use Xcode's search feature. If you mark your code with // TODO:..., you can search the entire project for // TODO and generate a nice list of tasks.

Also, note that comments starting with // TODO: or // FIXME: that are outside the scope of any method will appear in the method popup menu, just like #pragma mark lines.

Caleb
  • 124,013
  • 19
  • 183
  • 272