Search Unity

  1. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  2. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Participate with students all over the world and build projects to teach people. Join now!
    Dismiss Notice
  5. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

iCloud support in Unity Cloud Build with XCode 9

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

  1. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    70
    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:
    751
    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:
    70
    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:
    70
    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:
    751
    Yes the fix should be available for all projects now.
     
  6. smithmj5

    smithmj5

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