Is there an Objective-C mechanism to detect that you are running on Mountain Lion from within the iOS simulator? While in the iOS simulator I need to have a different code path execute on Mountain Lion that on earlier versions of Mac OS. The optimum solution would be to detect this at runtime but I think it would be an acceptable solution to detect at compile time as well and ifdef the two code paths. So... please post either if you have them. Thanks!
Asked
Active
Viewed 99 times
0
-
1Combining the code from the duplicate question with the result from `utsname()` and testing the kernel version should give you what you want. (Mountatin Lion is XNU version 12.2). – trojanfoe Feb 15 '13 at 16:04
-
I already know how to detect if I am running on a device. This is not the same problem. – Go Rose-Hulman Feb 15 '13 at 21:46
-
utsname() on the simulator looks promising. I will try that. Thanks – Go Rose-Hulman Feb 15 '13 at 21:53