瀏覽代碼

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 年之前
父節點
當前提交
e68c2c6c2a
共有 2 個文件被更改,包括 18 次插入0 次删除
  1. 10 0
      platform/iphone/game_center.mm
  2. 8 0
      platform/iphone/icloud.mm

+ 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() {