Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: View all TODO's in project

Tags:

xcode

todo

Is there a way to view all TODO marks in an Xcode project?

I'm aware of how to do this in a file through the function drop down but wasn't sure how to see all in a project.

like image 769
Marcus Leon Avatar asked Apr 09 '16 15:04

Marcus Leon


3 Answers

Instead of marking them as

//TODO: do something

I like to write them this way:

#warning TODO do something

That allows seeing them in the issue navigator. On production builds I even go as far as checking the "treat all warnings as errors" compiler setting.

like image 99
Cyrille Avatar answered Nov 09 '22 21:11

Cyrille


You can add a "Run Script" Build Phase to your Target that will look through your entire project for TODO:|FIXME: marks and flag them as warnings.

This new Build Phase will then list all TODO marks as warnings in the Issue Navigator whenever you Build your project %+B.

Here's a link to Ben Dodson's tutorial for doing this with Swift files: https://bendodson.com/weblog/2014/10/02/showing-todo-as-warning-in-swift-xcode-project/

Here is a screenshot of how it looks with a project I've been working on:

Showing TODO marks as Warnings in the Issue Navigator

like image 13
George Andrews Avatar answered Nov 09 '22 22:11

George Andrews


A straight up text search is how I would do it.

Hit shift+command+F (⇧⌘F), and search for //TODO: (or however your TODOs are formatted)

like image 12
mattliu Avatar answered Nov 09 '22 22:11

mattliu