/ Published in: Objective C
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#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
URL: http://www.pathf.com/blogs/2008/12/iphone-sim-device-preprocessor/