Compiling Source Code Conditionally for iOS App 模拟器条件编译,判断是IOS还是MAC
Listing2-1 Determiningwhetheryou’recompilingforasimulator//Sethelloto"Hello,"!#ifTARGET_IPHONE_SIMULATOR NSString*hello=@"Hello,iOSSimulator!";#else NSString*hello=@"Hello,iOSdevice!";#endifListing