Remove Google Play Games libraries on iOS (Unity3D開發之二十一)

猴子原創,歡迎轉載。轉載請註明: 轉載自Cocos2Der-CSDN,謝謝!
原文地址: http://blog.csdn.net/cocos2der/article/details/48313653

最近遊戲剛接完Google Play Game,結果發現加入Google Play Game Unity Plugins 之後,導出Xcode工程之後,會默認加入Google Play的iOS版。

然而,我們並不希望iOS版加入Google Play的模塊。咱們來看看如何移除Google Play Game iOS。

翻了下Google Play Game Plugins的代碼,發現其實別人已經增加了宏定義選項來關閉iOS版導出。下面的NO_GPGS定義就是用來關閉iOS版的。

#if (UNITY_ANDROID || (UNITY_IPHONE && !NO_GPGS))

定義NO_GPGS,用來關閉其iOS模塊:

這裏寫圖片描述

  1. Build Setttings-iOS-Player Settings-Other Setttings,在Scripting Define Symbol中添加NO_GPGS
  2. 移除Plugins/iOS下相關iOS文件(版本不同可能文件不一樣):
    • CustomWebViewApplication.h
    • CustomWebViewApplication.mm
    • GPGSAppController.h
    • GPGSAppController.mm

Ok,這樣就完成了,是不是很簡單。

發佈了151 篇原創文章 · 獲贊 303 · 訪問量 127萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章