Detecting iOS and Mac OS X when running unit tests
Detecting iOS and Mac OS X when running unit tests
- Subject: Detecting iOS and Mac OS X when running unit tests
- From: Tito Ciuro <email@hidden>
- Date: Sun, 08 Apr 2012 16:50:32 -0300
Hello,
I'm not sure whether I should post this question on the Cocoa or Xcode list. I'll try here since it has to do with unit tests: when I'm running a unit test, I need to detect whether I'm running on the Mac or on the simulator. Something like:
- (void)testFoo { if (<RUNNING_ON_MAC> || <RUNNING_ON_SIMULATOR>) { // Do something... } else { // Do something else... } }
At compile time I could use TARGET_IPHONE_SIMULATOR and TARGET_OS_MAC, but at runtime I'm not getting it right.
Any ideas?
Thanks,
-- Tito |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden