Search Unity

iCloud support in Unity Cloud Build with XCode 9

Discussion in 'Unity Build Automation' started by smithmj5, Aug 10, 2018.

  1. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    143
    I'm trying to enable iCloud support for iOS builds with Unity Cloud Build.

    Using Unity 2017.4.3f1 and Xcode 9.3.

    I solved several issues along the way, but am now stuck on this error from Unity Cloud Build:

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

    I've tried using the PlistDocument class to add the iCloudContainerEnvironment key and "Development" for the value, but this isn't the correct plist - it seems like there's a special "export options plist" that needs to be modified. The Unity Cloud Build log shows that it contains the following (bundle ID and team ID edited by me), so it seems like I need to somehow have iCloudContainerEnvironment added to that plist:
    Code (CSharp):
    1.         Generated plist file with the following values:
    2.         10240: -----------------------------------------
    3.         10241: {
    4.         10242:   "method": "ad-hoc",
    5.         10243:   "uploadSymbols": false,
    6.         10244:   "provisioningProfiles": {
    7.         10245:     "com.company.gamename": "aaaaaaa-bbbb-1111-2222-A11111b222222"
    8.         10246:   },
    9.         10247:   "signingStyle": "manual",
    10.         10248:   "teamID": "AAAAAAAAAA"
    11.         10249: }
    12.         10250: -----------------------------------------
    I can't use Xcode 8 as I have another plugin that requires Xcode 9.

    I also had to use the Unity XCode API from here https://bitbucket.org/Unity-Technologies/xcodeapi/src/stable/ because the one in Unity has a bug where it uses an "iCloud.com.company.gamename" as a key in the entitlements file, instead of a value.

    Happy to share more info about how I got this far if it would be helpful to anyone.
     
  2. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    A fix for this should be going out early next week. If you need it sooner, send me a PM with a link to your project and I'll get you set up.
     
  3. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    143
    PM sent with project link and ID. Thank you for offering to do this - I've spent a lot of time trying to work around this issue, looking forward to getting it working! :)
     
  4. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    143
    Just bumping this up to ask if the fix went out for this, for all projects? Thanks!
     
  5. dannyd

    dannyd

    Unity Technologies

    Joined:
    Jun 3, 2014
    Posts:
    785
    Yes the fix should be available for all projects now.
     
  6. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    143
    Awesome, thanks!