I am doing the iOS builds for a group of Unity (Unity3d) game developers.
After pulling the latest git updates, I start up the Unity editor on my Mac and choose "Build Settings", select the iOS target platform, press Build, specify a destination folder and that is it.
Can this exact process be done automatically via the terminal prompt?
Windows Unity Editor makes a Mac build; Windows doesn't have file permissions like macOS does; so the files don't have the "execute" bit set; so when opened on a Mac, it is not allowed to execute.
TLDR: You will need access to a Mac for an initial setup, afterwards you can develop without a mac.
Build your game for iOS Open Unity, go to File > Build Settings, and select Switch Platform on the bottom of the window. Unity will start making the switch, once it is finished, the Unity icon will appear next to the iOS icon and the Build option will be activated.
What you would need to do is create an editor method in Unity that does the iOS building:
http://docs.unity3d.com/Documentation/ScriptReference/BuildPipeline.BuildPlayer.html
And then call that method via the Unity command line arguments.
http://docs.unity3d.com/Documentation/Manual/CommandLineArguments.html
/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode -executeMethod MyEditorScript.MyMethod
As Calvin said, you can use the executeMethod switch of Unity's command line to call your own C# command and have some build logic executed. I have written a small article about how to do this. There is also a cheat sheet showing the Unity API to use for specific tasks.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With