iPhone or Simulator

Posts: 39
Joined: 2008.10
Post: #1
Is there a way for your code to know if its on the devise or on the simulator, theres something i want to run differently depending on if its on hardware or not. Thanks for any answers
Quote this message in a reply
Posts: 1,563
Joined: 2003.10
Post: #2
According to this Apple document, you can use the TARGET_IPHONE_SIMULATOR preprocessor define to distinguish between simulator and device.
Quote this message in a reply
Posts: 613
Joined: 2004.09
Post: #3
Take a look at [UIDevice model] as well.

Kyle Richter
Twitter: @kylerichter
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Most preferred iPhone simulator? TimMcD 5 6,000 Apr 16, 2010 05:30 PM
Last Post: Chris Burkhardt
  iPhone simulator performance Mister T 10 10,462 Feb 14, 2010 08:10 PM
Last Post: Zwilnik
  Why do I see strange texture borders on Simulator but not on iPhone? riruilo 2 4,409 Oct 4, 2009 10:33 AM
Last Post: riruilo
  DEFINEs to know if I'm using simulator or iphone riruilo 2 4,132 Jan 10, 2009 04:19 PM
Last Post: riruilo
  iPhoneOS vs iPhone Simulator Framework Differences Bachus 0 4,016 Oct 31, 2008 10:54 PM
Last Post: Bachus