From e68c2c6c2a14c32e7c07ab3158fc459b104212d3 Mon Sep 17 00:00:00 2001 From: Aren Villanueva Date: Mon, 16 Nov 2015 12:31:44 +1100 Subject: [PATCH] Use macros to determine which iOS SDK we have in order to be backwards compatible with older SDKs when fixing template compilation issues. --- platform/iphone/game_center.mm | 10 ++++++++++ platform/iphone/icloud.mm | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/platform/iphone/game_center.mm b/platform/iphone/game_center.mm index 1e46d9f014b..4cb7a20a7f9 100644 --- a/platform/iphone/game_center.mm +++ b/platform/iphone/game_center.mm @@ -30,8 +30,18 @@ #include "game_center.h" +#ifdef __IPHONE_9_0 + #import extern "C" { + +#else + +extern "C" { +#import + +#endif + #import "app_delegate.h" }; diff --git a/platform/iphone/icloud.mm b/platform/iphone/icloud.mm index a35d8ecd696..518385992d9 100644 --- a/platform/iphone/icloud.mm +++ b/platform/iphone/icloud.mm @@ -30,9 +30,17 @@ #include "icloud.h" +#ifndef __IPHONE_9_0 +extern "C" { +#endif + #import #import "app_delegate.h" +#ifndef __IPHONE_9_0 +}; +#endif + ICloud* ICloud::instance = NULL; void ICloud::_bind_methods() {