Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    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 at 7:19 PM.

  1. smithmj5

    smithmj5

    Joined:
    May 24, 2013
    Posts:
    57
    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:
    738
    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:
    57
    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! :)