We just started beta testing a new game for Mac OS using SDL 2.0.12. We’ve been having trouble with failure to launch on older Mac OSes. As in, launch the app and it immediately halts.
Testing in-house, the game wouldn’t launch on OS X 10.7. This was because SDL2 was using “[NSBundle loadNibNamed:owner:topLevelObjects:]”, which is introduced in OS X 10.8.
But our game also won’t launch on OS X 10.8. Not sure why yet.
So has anyone used the current SDL2 on older macs and found a cutoff line for what versions of the OS are supported? Thank you!
When I launched my game with SDL2 2.0.12 on 10.7, it halted with the following crash report:
*** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[NSBundle loadNibNamed:owner:topLevelObjects:]: unrecognized selector sent to instance 0x7f9ee1e1e780’
Swapping in SDL2 2.0.10 and changing nothing else got the game to launch.
Looking in the SDL2 source, topLevelObjects: is used in
staticbool LoadMainMenuNibIfAvailable( void )
and topLevelObjects: is only introduced in OS X 10.8.
I’m glad you got it to work, but I don’t know what you did to do it.
I read this as implying that loadNibNamed:owner:topLevelObjects will be called only if there’s a nib file, and since I don’t have one it could explain why I don’t see any issue.