Search Unity

iOS Build always failing

Discussion in 'Unity Build Automation' started by Mahgo, Dec 22, 2016.

  1. Mahgo

    Mahgo

    Joined:
    Dec 4, 2014
    Posts:
    52
    My iOS build is now always failing on the build cloud, but builds fine locally. This has been happening for a few weeks. I'm using Unity 5.4.3f1 and Xcode "Latest Compatible Version" (8). The error I'm getting is:

     
    mog-mog-mog and reddy36996 like this.
  2. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
  3. Mahgo

    Mahgo

    Joined:
    Dec 4, 2014
    Posts:
    52
    Description of issue: I am unable to build specifically for iOS. I am getting generic sounding errors in the logs

    Unity version: Unity 5.4.3f1

    XCode version: Latest Compatible Version (8.0)

    Source control: GIT

    Local build platform: Windows 10/OS X 10.11.6

    Build target: iOS

    Relevant plugins being used (i.e. Google Play Game Services, other plugins that may perform automatic post-build behaviors): Lunar Mobile Console, Zenject Dependency Injection, Best HTTP Pro

    Project name: PM me if this is needed.

    Build log (relevant chunk):
    Does it build locally from a fresh checkout? Yes
     
    reddy36996 likes this.
  4. reddy36996

    reddy36996

    Joined:
    Jan 10, 2016
    Posts:
    19
    I am also having the same issue as above.
     
  5. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
    Hi @reddy36996 please format your post as above

    - Sophia
     
  6. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
    @Mahgo We had a look at your logs and came across this line:

    Reason: Project /opt/workspace/workspace/[ORG].[PROJECT].default-ios/temp.yUv3st/Unity-iPhone.xcodeproj cannot be opened because the project file cannot be parsed.​

    You should look at your plugins and figure out which one is causing it to write an invalid xcode project out :)

    Hope this helps!

    - Sophia
     
  7. Mahgo

    Mahgo

    Joined:
    Dec 4, 2014
    Posts:
    52
    What would cause this to build locally fine but not on the build cloud?
     
  8. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
    Hello,

    Have you tried building locally from a fresh checkout?
    1. Clone/checkout your project into a new directory from source control.
    2. Open the Unity project in the same version of the editor that you are trying to build within Cloud Build.
    3. Build a version of your project for the same platform you are targeting in Cloud Build.
    4. Verify that the errors received in your Cloud Build log are not apparent during this local build.
    - Sophia
     
  9. Mahgo

    Mahgo

    Joined:
    Dec 4, 2014
    Posts:
    52
    Yes I have.
     
  10. brian_hpg

    brian_hpg

    Joined:
    Jan 13, 2017
    Posts:
    1
    Mahgo, did you ever figure this out? I'm having the same issue. Builds locally fine on two machines (one Windows, one Mac) but I get same error in Unity Cloud Build.
     
  11. ophilbert

    ophilbert

    Joined:
    Dec 3, 2014
    Posts:
    47
    Same issue too, did you add any plugin recently that could cause that? Lots of plugins use old python lib or custom lib instead of Unity's official Xcode manipulation API and it can sometimes mess up with the generated project.

    I'm going to cut off most of the postProcess and try a new build to check that.
     
  12. Mahgo

    Mahgo

    Joined:
    Dec 4, 2014
    Posts:
    52
    Changing the XCode version to 7.3 seemed to fix it.
     
  13. ophilbert

    ophilbert

    Joined:
    Dec 3, 2014
    Posts:
    47
    Fixed for me too.
    If any of you get this error it's definitely because one of your third parties is using an outdated XCode library.
    You have 3 options to fix it:
    1. Change your XCode Version to 7.3 or above
    2. Manually find and change your third parties postProcess build and update them to make sure they use Unity's XCode API
    3. Contact your third party and ask him to switch his/her postProcess to Unity's XCode API
    I recommend the latter as everybody can benefit from these changes
     
    SophiaC likes this.
  14. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
    Thanks @ophilbert for providing a solution! I hope this can help others too :)

    - Sophia
     
    UnityMaru likes this.
  15. Mahgo

    Mahgo

    Joined:
    Dec 4, 2014
    Posts:
    52
    Using Xcode 8.2.1 locally, it builds fine for me though.
     
  16. ophilbert

    ophilbert

    Joined:
    Dec 3, 2014
    Posts:
    47
    Yeah, as long as you don't use a launch file (xib, storyboard) you won't have any issue with that but either way it's better to stay up to date as Apple generally push some new features/capabilities that won't be retro-compatible with this old XCode version.

    If everything works for you @Mahgo maybe you could edit this thread's title with:
    "[FIXED] iOS Build always failing" or "[SOLVED] iOS Build always failing"

    This way people now instantly wether or not they will find a solution by clicking on this thread.
    Thanks.