iPhone or Simulator

Member
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
Moderator
Posts: 1,560
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
Moderator
Posts: 613
Joined: 2004.09
Post: #3
Take a look at [UIDevice model] as well.

Kyle Richter
DragonForged.com
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 3,813 Apr 16, 2010 05:30 PM
Last Post: Chris Burkhardt
  iPhone simulator performance Mister T 10 6,191 Feb 14, 2010 08:10 PM
Last Post: Zwilnik
  Why do I see strange texture borders on Simulator but not on iPhone? riruilo 2 2,712 Oct 4, 2009 10:33 AM
Last Post: riruilo
  DEFINEs to know if I'm using simulator or iphone riruilo 2 2,643 Jan 10, 2009 04:19 PM
Last Post: riruilo
  iPhoneOS vs iPhone Simulator Framework Differences Bachus 0 2,772 Oct 31, 2008 10:54 PM
Last Post: Bachus