While working on bug #462 I found that the latest code in trunk (r6517) builds on macOS 12 (with the macOS 12 SDK) but doesn't build on OS X 10.9 (with the OS X 10.10 SDK):
source/Irrlicht/CIrrDeviceOSX.mm:870:24: error: property 'wantsLayer' not found on object of type 'id'
Window.contentView.wantsLayer = YES;
^
source/Irrlicht/CIrrDeviceOSX.mm:883:24: error: property 'wantsLayer' not found on object of type 'id'
Window.contentView.wantsLayer = YES;
^
source/Irrlicht/CIrrDeviceOSX.mm:1603:28: error: property 'layer' not found on object of type 'id'
Window.contentView.layer.contents = image;
^
3 warnings and 3 errors generated.
Apple documentation says layer and wantsLayer should exist on Mac OS X 10.5 and later.
Probably relevant is that it is referring to contentView as a generic Objective-C id; of course generic ids don't have such specific properties.
Window is an NSWindow object and I checked how its contentView property is declared in a few SDK versions:
In OS X 10.8 and 10.9 it's:
- (id)contentView;
In OS X 10.10 it's:
@property (strong) id /* NSView * */ contentView;
In OS X 10.11 and 10.12 it's:
@property (nullable, strong) __kindof NSView *contentView;
This Stack Overflow post offers some speculation about why it used to be declared just as an id.
The fix that worked for me was to call the object's methods rather than trying to access them as properties, as in the attached patch for trunk. The issue does not affect the 1.8 branch.
Thanks again. Fixed in svn trunk r6522
I lack the objective c knowledge here, but calling a method when one is available sounds better anyway.