Skip to content

Instantly share code, notes, and snippets.

@AlanQuatermain
AlanQuatermain / iOS_42_Simulator_prefix.pch
Created November 2, 2010 15:34
A fix for iOS 4.2 builds against the iOS Simulator: some APIs (look at AVFoundation) are marked as available for 10.7. Sadly the Simulator SDK version of Availability.h doesn't define the 10.7 macros, so it results in horrible compiler errors on all such
#import <Availability.h>
// Fix a bug in the current iOS 4.2 beta SDK where 10.7 version isn't defined
#ifndef __MAC_10_7
#define __MAC_10_7 1070
#if !defined(__MAC_OS_X_VERSION_MAX_ALLOWED) || (__MAC_OS_X_VERSION_MAX_ALLOWED == __MAC_10_6)
#ifdef __MAC_OS_X_VERSION_MAX_ALLOWED
#undef __MAC_OS_X_VERSION_MAX_ALLOWED