Search Unity

Command line xcodebuild not working anymore since Unity 4.5 update

Discussion in 'iOS and tvOS' started by ClockStoneAdmin, Jun 4, 2014.

  1. ClockStoneAdmin

    ClockStoneAdmin

    Joined:
    Sep 1, 2012
    Posts:
    56
    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: https://www.dropbox.com/s/w7r0s41yvuwkqe2/Unity_4_5_XCodeBuild_error.txt

    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
     
  2. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    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:
    Code (csharp):
    1. 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".
     
  3. ClockStoneAdmin

    ClockStoneAdmin

    Joined:
    Sep 1, 2012
    Posts:
    56
    Thanks - that solved this issue!
     
  4. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    @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)!
     
  5. jeremyxyz

    jeremyxyz

    Joined:
    May 13, 2014
    Posts:
    3
  6. pahe

    pahe

    Joined:
    May 10, 2011
    Posts:
    543
    Yes. This should belong to the upgrade guide :)