Error building Player: IOException: Failed to Copy

i am trying to build xcode project for ios but i am facing some odd errors i never saw before

Error building Player: IOException: Failed to Copy File / Directory from ‘E:\Program Files\Unity\Editor\Data\Tools/MapFileParser/MapFileParser’ to ‘Temp/StagingArea\Trampoline\MapFileParser’.

edit: For the record its just empty project . This is happening in my every unity project

This is a major Unity bug that needs to be addressed by the Unity devs.

Essentially what you need to do is…

  1. Go to …\Unity\Editor\Data\Tools\MapFileParser
  2. Make a copy of MapFileParser.exe and name it MapFileParser without the .exe at the end. Windows will change the icon to a blank page icon and it wont be considered an application anymore.
  3. Create the build for iOS like you normally would in Unity. It should succeed now.
  4. Before starting XCode with the exported XCode project, add the .exe back on to the MapFileParser file in your exported project folder
  5. Xcode should succeed with the build. If you do not add the .exe back on to the file, the xcode build will fail with an error about not finding the file.

And wait for Unity devs to fix this bug.

Just free up your disk space where you are saving xcode project, i solved this issue by free up my xcode saving directory, this is strange but true.

I got the exact same error message while trying to create an IOS project on my Windows computer. In Unity 5.0 I was able to build an IOS/Xcode project under Windows. In 5.1, that no longer appears to be the case. My solution - Install a second version of Unity on your Mac machine, copy the unbuilt project over and re-compile it. That will create an XCode project without errors. That worked for me. It’s not too big a deal. After all, you still need to recompile it on a Mac under XCode anyway, so, no big loss.

I’m not having any problems building iOS on Windows.

Where is this path coming from: ‘Temp/StagingArea\Trampoline\MapFileParser’?

It makes sense that Unity can’t build into that folder, because its a (or the Unity Project) Temp folder. Are you sure you selected a valid, empty folder as a build location?

Change your scripting backend setting in player settings to Mono2x instead of Il2CPP. Much more stable with unity 5. That way, there’s no need to hack around something that is broken in the first place.

5.4.1f1 build still having this issue.
@ali_asif But it was happening, because i was creating the build outside of the project root folder, so i created a “Builds” folder in my root folder pressed build and no error.

I was facing this same error. All I have to do is go to Assets menu>Play Services Resolver>Android Resolver>Force Resolve. It worked for me atleast.