Search Unity

XCode - File Not Found (OnPostprocessBuild)

Discussion in 'Unity Build Automation' started by Bailywick, Aug 4, 2015.

  1. Bailywick

    Bailywick

    Joined:
    Mar 11, 2015
    Posts:
    17
    I'm working on a project with a fairly complex build process - using a fair number of plugins. As part of the process for iOS we use OnPostprocessBuild to automatically add files and libraries to the XCode project.

    As far as I can tell the OnPostprocessBuild code is run by the cloud build (logging comments are in the detailed log) but I'm getting a file missing error in xcode:

    ZipArchiveWrapper is a plugin I wrote to use ZipArchive (https://code.google.com/p/ziparchive/). The files for ZipArchive are copied into the xcode project by OnPostprocessBuild - and from my logging ZipArchive.h does appear to be copied in.

    I've done a clean checkout of the branch I'm using for Cloud Build locally and it builds with no problems*. Without being able to look at the xcode project file I'm having a hard time debugging this issue (trying to debug through more detailed logging comments when I can only do one build an hour means this is taking some time :b).
    Any ideas would be appreciated.

    I'm using Unity 4.6 and XCode 6.4 locally (and setup for Unity 4.x Latest and Latest XCode on the cloud build).

    * When I say no problem I do have to do a work around - we have different zip libraries for different OS as at the moment we haven't found a single library that works for all platforms. Unity doesn't ever run OnPostprocessBuild if it can't compile in then player when first launched (very annoying) so I have to set it up for OSX when I open unity and then swap to our iOS setup afterwards. However as I've seen the OnPostprocessBuild logging called on the Cloud Build I don't think this extra initial step is required.
     
  2. David-Berger

    David-Berger

    Unity Technologies

    Joined:
    Jul 16, 2014
    Posts:
    745
    I would make sure that XCode in UCB and the local one are the same, just to be sure it's not the problem with XCode itself. Other then that, I know it would be great to have the XCode project available for this kind of problems. Really, the only thing you can do is, to print out a file listing in the post process step right now. :rolleyes:
     
  3. Bailywick

    Bailywick

    Joined:
    Mar 11, 2015
    Posts:
    17
    That is exactly what I did (for anyone else interested in doing something similar I just added some code to my OnPostprocessBuild that used UnityEngine.Debug.Log to print out all the files and folders from the root directory up and that showed up fine in the extended log).

    I found that some of our code was assuming the build folder would be:
    <project root>/build/<buildType>

    While on Unity Cloud build it's:
    <project root>/<buildType>

    Fixed that up and now I've got a successful build! Thanks for the support. I have a few other questions about workarounds I made but I'll start another thread for that.
    Thanks again
     
    Last edited: Aug 13, 2015
    David-Berger likes this.