On Dec 9, 2008, at 2:37 PM, Jeff Laing wrote: The iPhone Simulator actually uses the regular, OSX Foundation. You
can actually use things that aren't available on the iPhone if you
aren't careful and don't pay attention to the documentation - they
just won't work when you go to build for your device.
This is most annoying when its common things like [NSString isEqualTo:]
It strikes me that Xcode, compiling for the simulator, really should be limiting itself to whats available on the actual operating system that it knows its targetting...
The problem is that when building for the Simulator, the actual operating system it's targeting is the Simulator, which is a hybrid of iPhone frameworks layered on top of Mac OS X base frameworks. You really truly are executing Mac OS X's Foundation, CFNetwork, kernel, etc. when running in the Simulator, and Xcode is behaving exactly correctly.
The point is that the simulator is not the iPhone OS, and that you really have to compile against the device's real frameworks using the Device SDK in order to make sure no desktopisms have crept into your code.
Chris |