Search Unity

PostProcess Build script fails when running from command line

Discussion in 'iOS and tvOS' started by rankornfeld, Dec 24, 2018.

  1. rankornfeld

    rankornfeld

    Joined:
    Sep 29, 2016
    Posts:
    57
    I am trying to build my project from the command line targeting iOS.
    When I build this from the editor, everything works! I have a PostProcess build script that I use.

    When I try to build form the command line using the following command:
    /Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -executeMethod BuildScript.BuildIOS -nographics -buildTarget iOS

    I am getting an error from my PostProcess build script saying:
    Assets/Editor/MyBuildPostprocessor.cs(9,23): error CS0234: The type or namespace name `Xcode' does not exist in the namespace `UnityEditor.iOS'. Are you missing an assembly reference?

    The line that generates the error is a simple using clause:
    using UnityEditor.iOS.Xcode;

    So it seems that for some reason, the command line build mechanism does not recognise the UnityEditor.iOS.Xcode assembly, and my PostProcess build script cannot run.

    Any ideas?

     
  2. rankornfeld

    rankornfeld

    Joined:
    Sep 29, 2016
    Posts:
    57
    Am I the only one with this problem?!
     
  3. PavelLU

    PavelLU

    Unity Technologies

    Joined:
    Feb 23, 2017
    Posts:
    107