Does Swift have a #warning equivalent? It\'s simply used to show a warning in Xcode\'s own GUI
I\'m also interested in whether there\'s a #error equivalent.
Still not added by Apple team yet. What I decided to do is probably a cheating, but at least it does show me a FIXME message. So what I do is declare FIXME() function in Swift file:
@availability(iOS, deprecated=1.0, message="I'm not deprecated, please ***FIXME**")
func FIXME()
{
}
and when I call it from any other function it does show a warning, e.g.
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
FIXME() // Incomplete method implementation.
return 0
}
For Swift 2 use
@available(iOS, deprecated=1.0, message="I'm not deprecated, please ***FIXME**")
My answer is not quite satisfy your question, but if you want something easy you can use this plugin of alcatraz which works in all the projects without any additional preparations. Just do the following:
1) install Alcatraz (Nice package manager for Xcode Plug-ins) by entering this line in terminal:
curl -fsSL https://raw.githubusercontent.com/supermarin/Alcatraz/deploy/Scripts/install.sh | sh
2) Then restart Xcode and on it launch agree to install all bundles not included in Xcode
3) In Xcode select menu item -> Window -> Package manager -> type in search panel XTodo and press install
4) Relaunch Xcode and again agree to install additional bundles
5) From now press Ctrl + T and you will see all Tags in nice window
It also has preferences for adding new tags