Search Unity

UCB Failures with Google Play Services Plugin

Discussion in 'Unity Build Automation' started by timmetim, May 10, 2017.

  1. timmetim

    timmetim

    Joined:
    Nov 6, 2013
    Posts:
    8
    Running into compile issues within UCB for iOS only. My android builds are working but no love on the iOS builds.

    Error:
    227: [Unity] Assets/GooglePlayGames/ISocialPlatform/PlayGamesPlatform.cs(412,27): error CS0103: The name `PlayGamesClientFactory' does not exist in the current context

    Code for google play services plugin:
    Code (CSharp):
    1.         public void Authenticate(Action<bool, string> callback, bool silent)
    2.         {
    3.             // make a platform-specific Play Games client
    4.             if (mClient == null)
    5.             {
    6.                 GooglePlayGames.OurUtils.Logger.d(
    7.                     "Creating platform-specific Play Games client.");
    8.                 mClient = PlayGamesClientFactory.GetPlatformPlayGamesClient(mConfiguration);
    9.             }
    10.  
    11.             // authenticate!
    12.             mClient.Authenticate(callback, silent);
    13.         }
    I have had to fix a number of little things here and there and obviously if i add GooglePlayGames to PlayGamesClientFactory like so GooglePlayGames.PlayGamesClientFactory.GetPlatformPlayGamesClient(mConfiguration); this will likely solve this compile issue but why is this working on UCB Android and not on my UCB iOS builds.
     
  2. timmetim

    timmetim

    Joined:
    Nov 6, 2013
    Posts:
    8
    Solution:

    Excluding all Google Play Game Services when building for iOS
    This plugin can be disabled for building on iOS. What this means is that the libraries and references originating in the GooglePlayGames namespace are excluded from the build. It does not affect code that has been written by you, such as calls to the GPGS API.

    To disable the Google Play Game Services in the iOS build, open the iOS player settings. Then in the "Other Settings" panel, find the entry named "Scripting Define Symbol" and add a symbol named: NO_GPGS (case sensitive).
     
    SophiaC likes this.