Command line xcodebuild not working anymore since Unity 4.5 update

We have a continuous integration system (Jenkins) that calls xcodebuild to create the IPA file from the XCode project created by Unity. Everything worked with Unity 4.3.4 and XCode 5.1.1 and the latest command line tools installed. Since Unity 4.5 we get the following error message when invoking xcodebuild per commandline:

ld: file not found: /Users/mschiestl/Documents/TestProject/XCodeProject/build/someproductname.app/someproductname

you can see the entire log here: Dropbox - Error - Simplify your life

Steps to reproduce:

  1. Create an empty Unity project
  2. Make an iOS Build
  3. try to build an IPA file on the command line (in the directory of the XCode project):
    xcodebuild -alltargets -configuration Release clean build CONFIGURATION_BUILD_DIR=/Users/mschiestl/Documents/TestProject/Builds/iOS/AdHoc

If the CONFIGURATION_BUILD_DIR parameter is removed the build succeeds without errors (however, no IPA is created)

Any ideas?

Thanks,
Michael
ClockStone Software GmbH

For Unity 4.5 we added support of test target to Unity iOS projects, which is handy when you want to launch your project on device via xcodebuild: xcodebuild test -destination "platform=iOS,id=<yourdeviceid>" -scheme Unity-iPhone

Unfortunately it means you need to adjust your cmd line you are using to build IPA file. Just replace “-alltargets” with “-target Unity-iPhone”.

Thanks - that solved this issue!

@Mantas-Puida , thanks for the Info! I could fix my own build server problem with that change. Haven’t seen any note about that in the release notes, so I would like to see that there mentioned (also for the future)!

Shouldn’t this be part of the upgrade guide?

http://unity3d.com/unity/whats-new/unity-4.5#upgrade-guide

Yes. This should belong to the upgrade guide :slight_smile: