0

Unfortunately the user-created warning pragma#warning no longer works for me in Xcode 7.1.

enter image description here

Are these # prefixed commands only in Objective-C Foundation Headers? Is there another way to specify them, or is it possible to use them with a bridging header?

Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92
Juan Boero
  • 6,281
  • 1
  • 44
  • 62

1 Answers1

0

It looks like you are trying to use #warning in Swift. This doesn't work, #warning is only compatible with Objective-C. The only thing that comes to mind is a comment or the things that are listed in this thread, such as the answer from inerrupt:

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**")
Community
  • 1
  • 1
Caleb Kleveter
  • 11,170
  • 8
  • 62
  • 92