Posted By

erik on 03/11/09


Tagged

cocoa Objective-c iphone


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

jamesming
umang_nine
trawor
cnathan


iPhone: Using Pre-processor Directives for Device Testing


 / Published in: Objective C
 

URL: http://www.pathf.com/blogs/2008/12/iphone-sim-device-preprocessor/

  1. #if TARGET_IPHONE_SIMULATOR // Device will hit external server over cell network NSString const *ROOT_URL = @"http://www.external-site.com"; #else // Simulator will hit local server over LAN NSString const *ROOT_URL = @"http://localhost:8667"; #endif

Report this snippet  

You need to login to post a comment.