Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Xcode does not compile anymore :(

Discussion in 'iOS and tvOS' started by Pasko, Oct 19, 2011.

  1. Pasko

    Pasko

    Joined:
    Sep 7, 2010
    Posts:
    60
    Hello,
    I just upgraded from unity 3.3 to 3.4, and Xcode to 4.2 supporting iOS5, and now the project generated via unity won't compile anymore on Xcode.

    The error I receive is weird: "iPhone_target_Prefix.pch' has been modified since the precompiled header was built"

    I use a couple of Prime31 plugins, I don't know if they disturb the process (since they do some postprocessing).

    Any help?
    Thanks, Pasko
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    did you do a replace build?
     
  3. Pasko

    Pasko

    Joined:
    Sep 7, 2010
    Posts:
    60
    I always build with "replace". Never used "append".
     
  4. Pasko

    Pasko

    Joined:
    Sep 7, 2010
    Posts:
    60
    It's even worse now. Even saving on a new folder creates the same problem.
     
  5. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,864
  6. Pasko

    Pasko

    Joined:
    Sep 7, 2010
    Posts:
    60
    Not really, since the difference is exactly between 4.0 (working) and 4.2-iOS5 (not working). Thanks anyway for the try.
    I'm still trying to fix the issue, but now I've downgraded to 4.0 again.
     
  7. Mantas-Puida

    Mantas-Puida

    Unity Technologies

    Joined:
    Nov 13, 2008
    Posts:
    1,864
  8. AntLewis

    AntLewis

    Joined:
    Feb 2, 2010
    Posts:
    238
    I'm getting the same error, even with mantasp's suggested fix. I'm not using any of Prime31's plug ins, but I am using ex2d. However, I've disabled everything in my game scene aside from the camera and I'm still getting this.
     
  9. AntLewis

    AntLewis

    Joined:
    Feb 2, 2010
    Posts:
    238
    Ok I continued to have random problems until I cleaned my project and then (what I can only assume) is clearing the cache : Organizer -> Projects -> Delete derived data. Everything works now.
     
    Beguiled and Suguma like this.
  10. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,772
    I had this problem too, deleting the derived data as dishylewis said worked perfectly.

    Thanks a bunch!
     
  11. goodhustle

    goodhustle

    Joined:
    Jun 4, 2009
    Posts:
    310
    Deleting derived data worked for me too, thanks!
     
  12. yome

    yome

    Joined:
    Nov 16, 2010
    Posts:
    9
    Another "me too" for the "Delete Derived Data" method.

    Thanks bishylewis!
     
    Last edited: Feb 11, 2012
  13. Kerak

    Kerak

    Joined:
    Nov 29, 2011
    Posts:
    6
    Delete Derived Data Rocks!!!
     
  14. jrgibson

    jrgibson

    Joined:
    Aug 5, 2011
    Posts:
    2
    Also just to clarify, you need to:

    1. Open the Organizer window (Shift-Command-2)
    2. Click "Projects" at the top
    3. Select your current project from the left
    4. Click the "Delete" botton on the right side of the window which is aligned with "Derived Data".
    5. Click "Delete" on the confirmation dialog box that you get.
     
    Last edited: Apr 1, 2012
    Suguma likes this.
  15. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,058
    this worked. thanks!!
     
  16. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,721
    Thanks here too + google research :)
     
  17. d.ibrahimoglu

    d.ibrahimoglu

    Joined:
    Dec 22, 2011
    Posts:
    19
    After every Unity update with XCode update, you should follow these steps.
    It works. Thanks.
     
  18. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    47
    Thanks for the thread, worked like a charm!
     
  19. Suguma

    Suguma

    Joined:
    May 29, 2015
    Posts:
    26
    Yup. It still works! Just don't forget to close your project before deleting the Derived Data. :b
     
  20. Beguiled

    Beguiled

    Joined:
    Mar 15, 2014
    Posts:
    14
    I did not need to delete the Derived Data to get through this, but Product > Clean (Shift-Command-K) did the trick for me!

    Thanks for the useful tips!
     
  21. ZzappSizzler

    ZzappSizzler

    Joined:
    Jan 15, 2017
    Posts:
    33
    Shift-Command-K for me too!!