I have a fairly large project on Unity 2018.4.2 that is failing in two places when I build: connecting to the user's microphone and opening the Finder window. Opening Finder takes up to 30 seconds to actually open it and microphone hangs whenever I try to start it.
We use the code below to open the Finder Window
System.Diagnostics.Process p = System.Diagnostics.Process.Start("open", $"\"{macPath}\"");
It eventually opens the Finder window, but only after 10-30 seconds. Meanwhile, a MacOS process called "tccd" kicks in causing the CPU to spike.
For Microphone, we use Unity's built-in Microphone class and we get hangs that last for 15-50 seconds. Same thing happens where the "tccd" process kicks in and spikes our CPU.
When we try to connect to the microphone the first time the OS asks us once if we want to allow the app to access the microphone, but it always hangs even after confirming. It never asks us about accessing Finder.
It seems like the MacOS is actively trying to slow us down from accessing these, but not completely stopping us, as Finder eventually opens and the microphone eventually connects (sometimes). We do not have these problems on Windows, it's only on MacOS. Any thoughts as to what is happening?
Note: There are no problems in Editor, only in Mac builds
We found the problem. Our code had to be signed in order to use it on a Mac. Now that the app is signed, we have access to everything we need as listed in our entitlements file