OCT 10, 2010
Super useful snippet I always forget. Pretty handy for handling MediaPlayer, CoreLocation or Camera-related operations on the iPhone Simulator. Cause we all know how testing-on-device sucks.
#if TARGET_IPHONE_SIMULATOR // do stuff when running on Simulator #elif TARGET_OS_IPHONE // do stuff when running on actual device #endif