0

This is really strange. All of the sudden my xcode project is showing warnings for almost all properties I have declared.

I'm building an app for Mac OS with Xcode 5.1.1.

Most properties I'm not specifying any attributes as I'm aware the default is a strong reference. But now all of the sudden I get warnings for everything.

What would I have done to trigger this? Up until a few minutes ago these warnings would never show up. I don't want to have to declare the attributes for every property - only the ones I don't want to be strong references.

It doesn't give me warnings for properties that are implicitly assign or atomic.

I've attached a screenshot.

Any ideas? Is there a build setting that accidentally got turned on?

Could there have been something in a single file that started triggering all these warnings? Like some kind of circular reference?

Edit: This is an ARC project.

Edit: I found the source of the problem: I have a non-arc file (-fno-objc-arc) including an arc file. Anyone know how to handle this properly?

enter image description here

gngrwzrd
  • 5,902
  • 4
  • 43
  • 56

3 Answers3

0

You have to give the property either retain, copy, weak, or strong, if it's an Objective C object and you're not using ARC. See this question for more info: Objective C - Assign, Copy, Retain

Community
  • 1
  • 1
Milo
  • 5,041
  • 7
  • 33
  • 59
0

In your build settings, check the Other Warning Flags option and see if something is in there. Check the other flags options as well just in case.

You may have something such as -Weverything, or -Wobjc-property-no-attribute that is turning on additional warnings that you don't have on by default, or in your other project.

Dave Wood
  • 13,143
  • 2
  • 59
  • 67
0

I found that I had included an ARC file in a non-ARC file (-fno-objc-arc). The file that was included was the AppDelegate.h file, which included a bunch of other stuff. So when the non-ARC file was being compiled, it included all these ARC files which then triggered warnings.

gngrwzrd
  • 5,902
  • 4
  • 43
  • 56