I created a simple data model with a 1-many relationship in XCode 4.1 on Lion.

The type of the property generated for this relationship is NSOrderedSet, which fails to compile because the type is unknown.

I searched the documentation to learn that this is a new kind of collection classes added for Mac OS 10.7 (Lion), especially useful in managed objects (I'm just getting used to the way Apple works: something as basic as a collection type in the language is bound to an OS release... interesting)

This makes sense, NdOrderedSet is apparently a combination of the features of NSSet and NSArray - that is, it has an indexed order like an array, with each element unique like a set. Nice. But, my questions are:

1. Why won't it compile?
2. Why is XCode generating something that won't compile?

I'm going to take a swag at #1 myself: My SDK is iOS 4.3, which predates Lion (and is not Mac OS but iOS) and simply does not have this new collection class.
okay, fair enough, but #2 stands: why did XCode generate it for me? Why not detect my SDK and generate something that works? Why not give me a choice?

This brings me to #3 and #4
3. What's the workaround? Should I change it to NSSet or NSArray? How did XCode generate these things before 4.0?
4. If I were to use NSOrderedSet (ie get it to work somehow) would it be backward compatible with prior iOS versions?