2
0
Эх сурвалжийг харах

Use macros to determine which iOS SDK we have in order to be backwards compatible with older SDKs when fixing template compilation issues.

Aren Villanueva 9 жил өмнө
parent
commit
e68c2c6c2a

+ 10 - 0
platform/iphone/game_center.mm

@@ -30,8 +30,18 @@
 
 #include "game_center.h"
 
+#ifdef __IPHONE_9_0
+
 #import <GameKit/GameKit.h>
 extern "C" {
+
+#else
+
+extern "C" {
+#import <GameKit/GameKit.h>
+
+#endif
+
 #import "app_delegate.h"
 };
 

+ 8 - 0
platform/iphone/icloud.mm

@@ -30,9 +30,17 @@
 
 #include "icloud.h"
 
+#ifndef __IPHONE_9_0
+extern "C" {
+#endif
+
 #import <Foundation/Foundation.h>
 #import "app_delegate.h"
 
+#ifndef __IPHONE_9_0
+};
+#endif
+
 ICloud* ICloud::instance = NULL;
 
 void ICloud::_bind_methods() {