Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity fails to deploy app to iOS device (XCode 'Could not launch... DerivedData...' )

Discussion in 'iOS and tvOS' started by Pi_3-14, Oct 28, 2012.

  1. Pi_3-14

    Pi_3-14

    Joined:
    May 9, 2012
    Posts:
    168
    This is driving me insane.

    My device is an iPod Touch latest generation, running iOS 6. I've just done the update -- just now.

    I make a 'hello world' XCode app, and it deploys to my iOS device perfectly.

    (NOTE that I have just a couple of days back, with this version of Unity / XCode / ..., successfully deployed to the device FROM UNITY, but now as I will show it will FAIL)

    I now make a HelloWorld UNITY app.

    I set the BUNDLE IDENTIFIER to 'com.foo.bar' in player-settings Inspector window, iPhone tab. (I've learned that one must do this otherwise errors will come).

    'Build Run'

    Unity brings up and starts manipulating Xcode. It appears to get all the way through the process right to the point of loading the app to the device...

    And then:

    Screenie:
    http://content.screencast.com/users/P-i-/folders/Jing/media/62035f07-b969-4e7c-af56-4952958918bc/00000018.png

    It lies:
    Code (csharp):
    1.  
    2. (BASH PROMPT)
    3. $ cd  /Users/sunfish7/Library/Developer/Xcode/DerivedData/__XCodeBuilds/Products/unitydeploytest.app/
    4.  
    5. $ pwd
    6. /Users/sunfish7/Library/Developer/Xcode/DerivedData/__XCodeBuilds/Products/unitydeploytest.app
    7.  
    8. $ ls -la un*
    9. -rwxr-xr-x  1 sunfish7  staff  26416080  1 Nov 01:00 unitydeploytest
    10.  
    I've been getting this problem intermittently for ages now. Maybe since I started using Unity? And always after some amount of random faffing about it fixes itself.

    Faffing about = trying every suggestion on this Stack Overflow answer

    But now it is impenetrable. I can't get it running on the device. I can't get past this error.

    I've just installed fresh iOS6 on my iPod Touch latest gen. Started a fresh Unity Project. Very first run. It FAILS.

    So all conversation I see from Google searching is not relevant to my case. Everyone is saying that some setting gets messed up, but in my case even on the INITIAL RUN it is failing.

    I do not know what to. What the hell is this brokenness?
     
    Last edited: Nov 1, 2012
  2. RolfBertram_dot_me

    RolfBertram_dot_me

    Joined:
    Mar 1, 2011
    Posts:
    128
    Have you tried "Build" and then start XCode manually, instead of ""Built and Run"?
     
  3. Pi_3-14

    Pi_3-14

    Joined:
    May 9, 2012
    Posts:
    168
    I think I have a solution:
    First I must close any open project in Xcode
    Next I go into organiser and delete the derived data (through hitting the buttons until they grey out and I can't hit them again, and then right clicking on the project entry on the left and removing that)

    I think the problem was I deleting the files manually from Finder.

    EDIT: FAIL THIS DOES NOT WORK
     
    Last edited: Oct 30, 2012
  4. Pi_3-14

    Pi_3-14

    Joined:
    May 9, 2012
    Posts:
    168
    FAIL

    I create a NEW BundleID in PlayerSettings inspector -> per platform -> iOS.
    I launch Xcode, close all open projects, go into organiser, delete all derived data
    Disconnect device remove app from springboard
    REBOOT
    Reconnect device
    Launch Unity, open project
    I build and run, creating a NEW destination folder (I've also tried just building and then launching Xcode separately to run the generated project)



    BROKEN.
     
    Last edited: Nov 1, 2012
  5. Texaggie96

    Texaggie96

    Joined:
    Jan 23, 2009
    Posts:
    81
    Had the same problem today. I cleaned the build in Xcode. Closed xcode down. Deleted any prior builds off the test device and cold rebooted it. Deleted the build folder completely. Restarted my dev machine. Problem went away. Some of that stuff my not have been necessary but I believe in the school of overkill.
     
  6. Pi_3-14

    Pi_3-14

    Joined:
    May 9, 2012
    Posts:
    168
    I have tried exactly these steps. In fact I have added a couple: after cleaning the build in Xcode I close the project, then go into organiser and delete all derived data until PROJECTS tab is blank. Then I continue with those steps. It fails.

    I suspect I may need to reinstall Xcode, Unity, maybe even reformat the machine.

    I wonder if this is an Xcode bug or a Unity bug. I can't see any intelligent way to dig into it.

    EDIT: Although I haven't been able to find an exact sequence of steps for fixing this, deleting derived data from organizer seems to be the way to go. You may need to do this twice consecutively.
     
    Last edited: Nov 11, 2012
  7. JakeT

    JakeT

    Joined:
    Nov 14, 2010
    Posts:
    34
    Clearing Derived Data in the Organizer worked for me. Actually I deleted the whole project from the Organizer and then Rebuilt from Unity.