Error building Player: IOException: Failed to Copy File / Directory from ‘E:\Program Files\Unity\Editor\Data\Tools/MapFileParser/MapFileParser’ to ‘Temp/StagingArea\Trampoline\MapFileParser’.
This is a major Unity bug that needs to be addressed by the Unity devs.
Essentially what you need to do is…
Go to …\Unity\Editor\Data\Tools\MapFileParser
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.
Create the build for iOS like you normally would in Unity. It should succeed now.
Before starting XCode with the exported XCode project, add the .exe back on to the MapFileParser file in your exported project folder
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.
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.