diff --git a/src/platform/platform.h b/src/platform/platform.h
index 546e7a3..5e892d1 100644
--- a/src/platform/platform.h
+++ b/src/platform/platform.h
@@ -31,6 +31,7 @@
 #define WAPP_PLATFORM_GNU
 #define WAPP_PLATFORM_POSIX
 #elif defined(__APPLE__) || defined(__MACH__)
+#include <TargetConditionals.h>
 #if TARGET_OS_IPHONE
 #define WAPP_PLATFORM_IOS
 #define WAPP_PLATFORM_APPLE