Search Unity

Unity Cloud Build Xcode 10 release and build infrastructure changes

Discussion in 'Unity Cloud Build' started by PhilMcJ, Oct 10, 2018.

  1. PhilMcJ

    PhilMcJ

    Unity Technologies

    Joined:
    May 29, 2014
    Posts:
    187
    Unity Cloud Build will soon be enabling support for Apple Xcode 10 (including support for iOS 12 and macOS 10.14). Adding this support requires some changes to the build environments, and this may cause problems with some older Unity versions in rare cases. These underlying changes will start being deployed on October 18th, 2018.

    Support will be prioritized for these more recent Unity versions, which should not have any compatibility issues:
    - 5.5.5p2 and later
    - 5.6.4p3 and later
    - 2017.1.2p3 and later
    - 2017.2.0p3 and later
    - 2017.3.0 and later
    - 2018 or later

    If your project relies on an older Unity version, it should - in nearly all cases tested - continue to build normally without any changes, or at most with a new clean build. However, some (rare) compatibility issues may arise for which the best solution will be to upgrade to a newer Unity version if at all possible. The Cloud Build development and support teams can be reached via support tickets for assistance in these cases.


    iOS CloudKit:

    For those of you using CloudKit when building for iOS, you may notice some build issues initially when upgrading to Xcode 10 in Unity Cloud Build (when it becomes available). This typically will show up as an error during the Xcode signing process with an error like "Provisioning profile ... doesn't match the entitlements file's value for the com.apple.developer.ubiquity-kvstore-identifier entitlement".

    Xcode 10 introduced a new internal build system in Xcode, and this new Apple build system appears to have an issue with expanding "$(TeamIdentifierPrefix)" in entitlements files. This will cause signing to fail as pointed out above. To fix the issue, you will need to force the build process to fall back to use the old Xcode build system, by configuring some extra Fastlane options in the project. A more in-depth explanation about Fastlane in UCB can be found here: https://forum.unity.com/threads/xcode-9-multiple-provisioning-profiles.545121/

    The short version requires adding two files to your repository:
    * Assets/ucb_xcode_fastlane.json (name and location are important)
    * Assets/ucb/Gymfile (needs to match path configured in ucb_xcode_fastlane.json)


    Example "Assets/ucb_xcode_fastlane.json":

    {
    "gymfile": "Assets/ucb/Gymfile"
    }

    Example "Assets/ucb/Gymfile":

    xcargs '-UseModernBuildSystem=NO'


    As pointed out in the forum post referenced above, the Cloud Build team is working to simplify this process and make more of the Fastlane process customizable. If there are specific questions or suggestions for things you want to see here please let us know!
     
    Last edited: Apr 23, 2019
    thorikawa likes this.
  2. PhilMcJ

    PhilMcJ

    Unity Technologies

    Joined:
    May 29, 2014
    Posts:
    187
    Reminder: the infrastructure changes in advance of adding Xcode 10 support are set to happen tomorrow (October 18th, during the US daytime/European evening). The great majority of projects and builds should be unaffected based on testing, and the great majority of any issues that are encountered after the changes should be resolved by running a one-time clean build.

    Once that dust settles, there'll be an update on Xcode 10 itself.... more to come.
     
  3. AlterRatione

    AlterRatione

    Joined:
    Mar 24, 2017
    Posts:
    2
    Is there an ETA to when it will become available to being chosen on Cloud Build Config settings?
     
  4. PhilMcJ

    PhilMcJ

    Unity Technologies

    Joined:
    May 29, 2014
    Posts:
    187
    There should be an announcement on that very soon - a few brand-new bug reports are being looked at right now to be sure that they're not symptoms of surprise compatibility issues (or to determine if any changes might be needed). Once that's sorted, there'll be an update posted here in the forum.
     
  5. Speedrun-Labs

    Speedrun-Labs

    Joined:
    Aug 1, 2014
    Posts:
    14
    @PhilMcJ Is there any update on the xcode 10 support on UCB?
     
  6. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    204
    I am happy to inform you that the long awaited release of Xcode 10 on Cloud Build will be happening this Wednesday, 7th November.

    Any customer that has been in contact with Support who has been temporarily reverted to the legacy build agents will see Xcode 10 as an option but will unfortunately be limited to Xcode 9.4.1, until their issue with Support has been resolved.

    Dedicated Build Agent Customers will also see the option for Xcode 10 and be limited to Xcode 9.4.1. We will be reaching out to these customers individually to co-ordinate the upgrade with them within the next week.
     
    StefanoCecere likes this.
  7. Mint-Mobile

    Mint-Mobile

    Joined:
    Apr 9, 2015
    Posts:
    7
    Set all config as you said

    The short version requires adding two files to your repository:
    * Assets/ucb_xcode_fastlane.json (name and location are important)
    * Assets/ucb/Gymfile (needs to match path configured in ucb_xcode_fastlane.json)


    Example "Assets/ucb_xcode_fastlane.json":

    {
    "gymfile": "Assets/ucb/Gymfile",
    }

    Example "Assets/ucb/Gymfile":

    xcargs '-UseModernBuildSystem=NO'

    Code (CSharp):
    1. /BUILD_PATH/.rvm/gems/ruby-2.1.1/gems/json-2.1.0/lib/json/common.rb:156:in `parse': [!] 765: unexpected token at '{"gymfile":"Assets/ucb/Gymfile"}' (JSON::ParserError)
     
  8. DominikP

    DominikP

    Joined:
    Apr 28, 2015
    Posts:
    4
    Hi,

    will support for older versions of Xcode be maintained? Since today, I have issue with building, because Unity Cloud is forcing xCode 10 for our project, even when in configuration we have selected Xcode 9.2.

    upload_2018-11-19_11-49-25.png

    And from logs

    1715: + Building with Xcode 10.0
    ...
    1728: ▸ ❌; clang: error: no such file or directory: '/APPLICATION_PATH/Xcode10_0_0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/lib/Libstdc++.tbd'
    ...
    1741: ❌; clang: error: no such file or directory: '/APPLICATION_PATH/Xcode10_0_0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/lib/Libstdc++.tbd'
    1742: ▸ clang: error: no such file or directory: '/APPLICATION_PATH/Xcode10_0_0.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/lib/Libstdc++.tbd'
    1743: publishing finished successfully.
    1744: Finished: FAILURE

     
    Last edited: Nov 19, 2018
  9. ollieblanks

    ollieblanks

    Unity Technologies

    Joined:
    Aug 21, 2017
    Posts:
    204
    @DominikP, This was a known issue that should now be resolved and you should no longer be experiencing Xcode 10 being incorrectly selected. Sorry for any inconvenience.

    @Mint-Mobile, Sorry to hear that you are still having trouble. Seems like a character may not be correct due to copy and pasting from the browser. If you are still having trouble, please log a support ticket via the Cloud Build section of the Developer Dashboard and we will happily take a closer look
     
  10. rarebyte

    rarebyte

    Joined:
    Sep 26, 2015
    Posts:
    10
    Here is the correct ucb_xcode_fastlane.json (note that there is no comma character):

    {
    "gymfile": "Assets/ucb/Gymfile"
    }
     
    PhilMcJ and ollieblanks like this.
  11. joshskelton

    joshskelton

    Joined:
    Aug 30, 2013
    Posts:
    22
    Can someone point me where to see how to make a Gymfile?
     
  12. joshskelton

    joshskelton

    Joined:
    Aug 30, 2013
    Posts:
    22
    Never mind. I figured it out, but I'm still getting the same error. Has anyone here had this issue lately?
     
  13. PhilMcJ

    PhilMcJ

    Unity Technologies

    Joined:
    May 29, 2014
    Posts:
    187
    Note: the syntax error in the JSON snippet above has been fixed. Thanks to all who pointed it out.
     
  14. joshskelton

    joshskelton

    Joined:
    Aug 30, 2013
    Posts:
    22
    Does this issue still persist? Namely with Unity 2018.4.7f1? I'm getting errors that the author has pointed out. My builds work fine when built locally and uploaded from my local machine. It doesn't work when building through Unity Cloud Build.
     
unityunity