Development build fails for IOS (Failed running UnusedBytecodeStripper.exe)

I want to profile my game on an IOS device but my build fails when I check the “Development Build” box. I get this huge error message in the console.

Failed running /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out "/Volumes/STORE N GO/Platform Game/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b True -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Volumes/STORE N GO/Platform Game/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Volumes/STORE N GO/Platform Game/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Volumes/STORE N GO/Platform Game/Temp/StagingArea/Data/preserved_derived_types.xml" -d "/Volumes/STORE N GO/Platform Game/Temp/StagingArea/Data/Managed" -a  "/Volumes/STORE N GO/Platform Game/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a  "/Volumes/STORE N GO/Platform Game/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll"

stdout:
SweepReport:
System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition
Mono.Cecil.MethodDefinition => System.Configuration.Internal.IInternalConfigRoot get_Root()System.Void Init(System.Type,System.Object[])System.String NormalizeLocationSubPath(System.String,System.Configuration.Internal.IConfigErrorInfo)System.Object CreateConfigurationContext(System.String,System.String)System.String DecryptSection(System.String,System.Configuration.ProtectedConfigurationProvider,System.Configuration.ProtectedConfigurationSection)
Mono.Cecil.FieldDefinition => System.Configuration.ContextInformation evaluationContextSystem.Configuration.ConfigurationSaveEventHandler SaveStartSystem.Configuration.ConfigurationSaveEventHandler SaveEndSystem.Configuration.ConfigurationElementProperty elementPropertySystem.Boolean systemWebInUse
Fatal error in Mono CIL Linker
System.IO.IOException: Sharing violation on path /Volumes/STORE N GO/Platform Game/Temp/StagingArea/Data/Managed/tempStrip/Assembly-CSharp.dll.mdb
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in <filename unknown>:0 
  at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess)
  at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (Guid guid) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.Mdb.MdbWriter.Dispose () [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.OutputStep.OutputAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.OutputStep.ProcessAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0 
  at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0 
  at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0 
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:98)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)
UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:208)
UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)
UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:205)
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:132)
UnityEditor.HostView:OnGUI()

I think it the real problem has to do with the part
“Fatal error in Mono CIL Linker
System.IO.IOException: Sharing violation on path /Volumes/STORE N GO/Platform Game/Temp/StagingArea/Data/Managed/tempStrip/Assembly-CSharp.dll.mdb”

What does this mean and how can I fix it? Any help is much appreciated!

@OttoClausen For me, the key was the error:
System.IO.IOException: Sharing violation on path /Volumes/STORE N GO/…

If your “STORE N GO” is a USB stick/drive, Unity seems to be unable to use that type of device, at least on a Mac. When I moved my Unity project to a “real” external drive, the build succeeded perfectly.