Trouble Building an iPhone Unity Project

The project is hosted over the network on a Windows 7 machine that acts as the server. iPhone Unity is running on OS X 10.5. The Project points to a shared/mapped folder on the network. Unity recognizes changes in the file structure, allows for editing files across the network and locally, and compiles Unity Remote fine.

Performing a "Build and Run" causes an error pop box with options to (Cancel) (Force Quit) (Try Again).

Title: Moving file failed Details: Moving Temp/BuildingPlayer/Data to Temp/BuildingPlayer/iPhone-Trampoline/Data failed because permission for the file was denied


I've duplicated the project on the local OS X machine and it builds fine. I am not sure how to resolve this issue. Thank you.

Currently Unity iPhone does not support projects located on network shares. Support for such feature might come in the future.

I saw this answer and have had this problem over and over, and it comes at seemingly totally random times - and just wanted to add my experience to this Q/A to hopefully show that the problem appears to be bigger than what the #1 Answer mentioned:

...That the problem happens with projects located on network shares only] - Which again, sounds like it is a problem if he knows about that, but it isn't the 100% answer to this problem/bug if you're getting a build error that mentions something that contains "iphone-trampoline"; because I am not using any network shares and have run into this bug too many times to count...so there is definitely something else that is still unknown, causing this problem.

AND --> The same fix mentioned above (and in my post below) should hopefully help anyone else running into this problem to get their "broken" projects back on track. So, please read on if you need a fix for this as well.

I have had this EXACT same problem happen NUMEROUS times (...too many to count actually - and this is with the latest Unity Pro 3 [v3.1.0f3] with my projects, and have spent tens of hours trying to figure out what "temp" file or what-have-you was incorrect, etc...and had no luck until one day I for some reason just copied the project folder over to a new location, just another folder on the SAME, local (Not networked, just a standard internal ATA drive...so the one answer above mentioning it not currently supporting "networking shares" (while that might be some other problem) --> I can definitely say that this problem (where it comes up with a build/run console error of "....iPhone-trampoline...etc..." message and then refuses to build/run into the next Xcode phase...so it stops in the last-bit of the progress-bar "movement" when building/running in Unity, right near the end of whatever it's doing at that point; and then throws this "iphone-trampoline" type error/failure message in the console and the build stops...with everything basically unusable (...or should I say, I have not found any way to fix things by doing things such as tossing the temp folder, previous build folders, etc...in hopes of it rebuilding it's cache/temp files...er, well I don't know lol...just with hopes that a project could be salvaged].

However, doing any of that seems to offer no way of getting the project back on track and build-able, and to proceed to have it passed on to Xcode and built/run on the iPhone, etc. -

But any way, it seems that since I've dealt with this error a lot; and only work on a single Macintosh, with no networked drives, etc.; I would conclude that there must be some type of bug in the Unity build phase (at least for the iPhone) itself. I'm not a professional programmer, so I could be wrong, but I just don't really see where else a bug could lie...

FOR ANYONE THAT FOUND THIS POST WITH THIS SAME PROBLEM, HERE'S A (HOPEFULLY, GLOBAL) FIX:

Until I am hoping that the Unity devs hear of this and track down the culprit; if it is in Unity; or at least maybe help us find out WHY it is happening and what causes it to occur

As mentioned above, just as the same fix for if you were/are using a networked drive with your project --> I am meaning, if you are unable to build your iPhone app because of this "iphone-trampoline"-etc. error/bug; then just try this:

  • Copy your ENTIRE root/main project folder, or even just Duplicate it to the same exact folder.

  • Then, for some totally-strange-reason (at least to me) --> Just reopen that NEW project [eg. open say, your first Scene file or whatever], and if you are as lucky as the 2 of us that posted here have been, that new (exact duplicated project folder, even being run/opened from the same parent folder) will then build through the Unity build-phase; correctly pass on to Xcode; and the be correctly built/installed.

So, if anyone comes across this Q/A and knows more about this, and could explain:

  • Exactly WHAT causes a project to, in one instant work & be build-able perfectly...

  • And then the next random instant, causes the entire project to just break and become completely broken and un-buildable?

  • AND Most of All --> Why would something so simple as just doing a "duplicate" in the Mac Finder to duplicate/copy the main Project folder and all of it's contents [including...what I'd expect, would be also copying/duplicating all of, whatever the broken parts are as well (?)]

...That last point is the most curious one to me, as I cannot explain it except that the Mac filesystem is just repointed to a new copy of the exact same files (since every single file inside the original broken project folder were duplicated into that new, now WORKING project folder. :)

I'm at a loss, but would be SUPER interested to find out what's happening, and even more important --> To make sure if it IS indeed an actual bug within Unity; that it can hopefully be fixed (I'll submit a link to this for them to read as a bug report in a few minutes...if I don't forget). Or, since the "fix" involves duplicating the folder in the Mac OS X desktop/Finder and then it just magically "works" again, then perhaps, although unlikely (only because I've never had any trouble with any other type of large project randomly just "breaking" and finding out that the only fix is that it needed to be duplicated and it'd work again...which brings me back to thinking it is some odd bug in Unity...

...But with my very-little programming knowledge, I am thinking (Ok, 101% totally purely guessing blindly LOL); that it possibly has something to do with the Unity-created "Temp" folder [and it's contents] --> And, when the Project folder is duplicated/copied; and the Unity project is then reopened, that maybe, it triggers a "fix/update" function in Unity's loading process, that notices something is wrong [the file has moved/been-duplicated/something(?)] and some of those temp files/pieces - (related to the main topic of this thread, which is this "iphone-trampoline" stuff) - are then correctly "caught/noticed" bye the Unity startup/load-project functions, which then correctly, "correct" or "update" those "broken" files/pieces with the correct information that was possibly "corrupted" in the unworking/broken project [the original, not the newly duplicated project folder] (?)

...Yet again, take that with a single-grain of (cheap) salt - because I am an extremely UN-experienced programmer; and what I wrote above as my guess is similar to a lot of the essays I used to write back in school (Eg. Purely just a lengthy bunch of confusingly random, somewhat-lowly-educated guesses that probably make no sense to anyone outside of my own, very-strange brain).

:)