How to suppress Xcode "Attribute unavailable" warning in XIB file?

My application is focused on 10.6, and the Deployment value for all .xib files was 10.6, except for one that recently changed to 10.7 (I don't know when). If I change it to 10.6, I get the following warning from Xcode:

/Users/andy/Source/.../Preferences.xib:383: Identifier on OS X versions prior to 10.7 

Here is the relevant part of the .xib file:

 381: <string key="NSFrame">{{1, 1}, {116, 104}}</string> 382: <reference key="NSSuperview" ref="14642427"/> 383: <reference key="NSNextKeyView" ref="1001986100"/> 384: <string key="NSReuseIdentifierKey">_NS:11</string> 

(In fact, when I open .xib in BBEdit to see the warning line and then close it and clean / build in Xcode, the warning line seems to change but always moves. The time the warning occurred, it was an NSSuperview line, which was on line 383, which is at least strange).

Sometimes I get two warnings. Another warning:

 file://localhost/Users/andy/Source/.../Preferences.xib: warning: Attribute Unavailable: Identifier on OS X versions prior to 10.7 

Which highlights the custom view in the .xib file when I click on it.

Can someone tell me what this warning means and how I get rid of it?

I am developing under 10.8 using Xcode 4.4.1, and I believe that this warning will cause problems when working under 10.6 (something that I cannot do during development). I am pleased to provide additional information as necessary.

+4
source share
1 answer

To remove it:

1) Select the XIB file (the editor will open)

2) Press cmd + opt + 3 to open the Identity Inspector for the XIB in question. Then click the warning in the warning navigator - which the intruder should select in the NIB editor.

3) Clear the value in Identity> Identifier (just below the field where you specify the custom class)

4) Save and build.

That should do it.

What does it mean:

You are using a document function that is not supported by 10.6.

In particular, this key / value seems to be associated with @protocol NSUserInterfaceItemIdentification :

The NSUserInterfaceItemIdentification protocol is used to associate a unique identifier with objects in your user interface. A protocol adopted by the AppKit interface objects to support window recovery, whereby information about the window and other objects associated with the interface is saved and used to restore the application interface during the next startup cycle.

The key to search in XIB is userInterfaceItemIdentifier .

+8
source

All Articles