- Home /
Question by
Prince_of_Persia · Apr 29, 2018 at 07:51 AM ·
iosbuild-errorbatchmode
Build Target ios Can't be used when running Unity in batchmode
I've been trying to automate our iOS builds from Unity using Jenkins. The problem is that when I pass in "-buildTarget ios" to Unity executable, It prints out Build target platform 'iOS' could not be used. without any extra information so that I can know why! I can build successfully using Unity Editor. I have tried either of following set of arguments and still getting the same error.
-batchmode -nographics -projectPath "/Volumes/Data/UnityProject" -logFile
"/Volumes/Data/UnityProject/Unity/Editor.log" -executeMethod
PlayerBuilder.BuildiOS -buildPath ${WORKSPACE} -quit -buildTarget ios
-batchmode -nographics -projectPath "/Volumes/Data/UnityProject" -logFile
"/Volumes/Data/UnityProject/Unity/Editor.log" -executeMethod
PlayerBuilder.BuildiOS -buildPath ${WORKSPACE} -quit -buildTargetGroup ios -buildTarget ios
If I omit -nographics, Is produces an error about connecting to window server and quit. If I omit -buildTarget iOS it produces compile error saying UnityEngine.iOS Could not be found. By the way I am using MacOS.
Any help appreciated,Thanks
Comment
Answer by belveder_79 · Feb 18, 2019 at 08:05 PM
I have the same problem. Did you find a solution to this?
Your answer
![](https://koobas.hobune.stream/wayback/20220612161715im_/https://answers.unity.com/themes/thub/images/avi.jpg)