Search Unity

iOS build fails with cloud build using latest Xcode 9

Discussion in 'Unity Build Automation' started by Juan_Perchang, Nov 7, 2017.

  1. Juan_Perchang

    Juan_Perchang

    Joined:
    Nov 7, 2016
    Posts:
    6
    Hi there:
    Last week we finaly updated to Unity 2017.2 and everyithing works fine localy and we can build iOS and android as usual. However in iOS we are getting an error on Cloud Build:

    2017-11-06 05:42:41.336 xcodebuild[7135:43785] [MT] IDEDistribution: Step failed: <IDEDistributionOptionsStep: 0x7fd412f458f0>: 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}

    error: exportArchive: exportOptionsPlist error for key 'iCloudContainerEnvironment': expected one of {Development, Production}, but no value was provided

    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}​

    I did some research about it and I think that the issue might be on the way that the export plist is generated:

    64662: Generated plist file with the following values:
    64663: ▸ -----------------------------------------
    64664: ▸ {
    64665: ▸ "method": "ad-hoc",
    64666: ▸ "uploadSymbols": "false",
    64667: ▸ "provisioningProfiles": {
    64668: ▸ "com.[****]": "****"
    64669: ▸ },
    64670: ▸ "teamID": "****"
    64671: ▸ }​

    I read somewhere that this list should include the "iCloudContainerEnvironment" but I cannot be sure as I cannot modify this list. I still can build if I switch back to Xcode 8.3 but that's not the best of the solutions. If anyone has any suggestions we will be thankful.
     
  2. JQgames

    JQgames

    Joined:
    Sep 27, 2017
    Posts:
    4
    We are having the same issue on our Unity 2017.2 jenkins build, specifically the 'exportOptionsPlist' step. The file that it generates is missing the specified key.

    This only seems to go wrong on automated builds, since everything goes fine when building from the XCode GUI.
     
  3. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,080
    Im facing the same issue. Did you manage to fix this?
     
  4. Juan_Perchang

    Juan_Perchang

    Joined:
    Nov 7, 2016
    Posts:
    6
    No, sorry, I'm still having it.
     
  5. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,080
    We found a patch by using this code:
    projCapability.AddiCloud(true, false, false, true, empty);

    instead of this:
    projCapability.AddiCloud(true, false, empty);
     
  6. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    143
    I'm having the same issue with iCloudContainerEnvironment missing from the exportOptionsPlist with Unity Cloud Build.

    I'm using Unity 2017.4.3f1 and unfortunately it doesn't have an AddiCloud function that accepts five parameters (it only has a function that accepts three parameters).

    I've solved every other issue related to enabling iCloud with Unity Cloud Build with XCode 9.3, but I'm really stuck on this one.

    Anyone else having the same issue, or have more details on a potential fix?
     
  7. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    143