Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

icloud doesn't work with Unity Cloud no matter what

Discussion in 'Unity Build Automation' started by newlife, Jun 18, 2018.

  1. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    Hello,
    we are using Unity 5.6.5 and Unity Cloud Build with xcode 9.3 (latest) to update our core app Real Drift Car Racing on iOS, previously made locally with Unity 4.7 and xcode 6.3.2.
    We are facing a lot of issue with iCloud, we simply can't make it work.
    It works perfectly with the published online version.
    We are using https://bitbucket.org/Unity-Technologies/xcodeapi to add capabilities to xcode project via PostProcessBuild:

    Code (CSharp):
    1.  
    2. using UnityEngine;
    3. using UnityEditor;
    4. using UnityEditor.Callbacks;
    5. using UnityEditor.iOS.Xcode.Custom;
    6. using System.IO;
    7.  
    8. public class IosPostProcessBuild : MonoBehaviour
    9. {
    10.     [PostProcessBuild]
    11.     private static void PostBuildActions(BuildTarget buildTarget, string path)
    12.     {
    13.         if (buildTarget == BuildTarget.iOS)
    14.         {
    15.             string projectPath = path + "/Unity-iPhone.xcodeproj/project.pbxproj";
    16.             Debug.Log(projectPath);
    17.             ProjectCapabilityManager projCapability = new ProjectCapabilityManager(projectPath, "sipon.entitlements", "Unity-iPhone");
    18.  
    19.             projCapability.AddGameCenter();
    20.             projCapability.AddInAppPurchase();
    21.             string[] empty = null;
    22.             projCapability.AddiCloud(true, false, empty);
    23.             projCapability.WriteToFile();
    24.         }
    25.     }
    26. }
    Our app uses iCloud capability with key-value storage.

    With this code, Unity Cloud Build returns this error:
    Error Domain=IDEFoundationErrorDomain Code=1 "exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}, but no value was provided" UserInfo={NSLocalizedDescription=exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}, but no value was provided}


    This error seems due to a bug in xcode 9, so we reverted to xcode 8.3 and got this error:
    Failed to expand identifiers "{("iCloud.$(CFBundleIdentifier)")}": Error Domain=IDECapabilitiesErrorDomain Code=1 "The operation requires a selected developer portal team." UserInfo={NSLocalizedDescription=The operation requires a selected developer portal team., NSLocalizedRecoverySuggestion=}


    Reverted once again to xcode 7.3, another error:
    /BUILD_PATH/realgames13793.real-drift.real-drift-full-ios/temp.XXXXXX20180617-5617-166vti6/Libraries/Plugins/iOS/GADUPluginUtil.h:12:11: error: unknown property attribute 'class'@property(class) BOOL pauseOnBackground; /BUILD_PATH/realgames13793.real-drift.real-drift-full-ios/temp.XXXXXX20180617-5617-166vti6/Libraries/Plugins/iOS/GADUInterface.m:71:67: error: no known class method for selector 'setPauseOnBackground:'


    Can someone please help us with this in any way?
    We are ready to buy paid support in order to have this sorted.
     
  2. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,064
    anyone? We even wrote to unity in order to receive paid support (which is claimed to be 24 Hour Support) but we didn't receive any reply till now. We need to fix this ASAP, we are stiuck on this since one week.
     
  3. studentutu

    studentutu

    Joined:
    Oct 22, 2017
    Posts:
    105
    How did you fix it? Is it possible to add other entitlements like Push through the [PostProcessBuild] Unity.IOS.XCODE namespace? By the way in Unity 5.6 + you don't need the Github project of the Unity XcodeAPI, just use the namespace