(Solved) IOS Build Error (Copying file failed)

Good day everyone,

When I build the game for android it works fine. I used the same code for IOS after downloading Xcode. However, when I click build after I choose IOS devices I keep getting the following error:

Copying Library/ScriptAssemblies/UnityEngine.Advertisements.dll to Temp/StagingArea/Data/Managed/UnityEngine.Advertisements.dll: Operation not permitted

With the following options:

Force Quit >>>> Exit Unity

Cancel >>>>>>> Cancel build

Try Again >>>>>> Does Nothing

Please advise.

Thanks

Same issue here. Did you find a solution to the problem?

Yes, I used the solution provided in this link:

https://forum.unity.com/threads/solved-failed-to-copy-unityengine-advertisements-when-build-ios.630766/

I looked for UnityEngine.Advertisements.dll in my project files and I found three files with similar names one of them contain metadata in the name.

I deleted all of them and updated the ad package from the package manager.