When profiling a standalone application target using Instruments with the allocations instrument, the following happens.
Error: Allocations tracking library was not loaded in time.
The error happens because Instruments must inject a runtime library into the binary being profiled. To do so, Instruments uses environment variables meant for DYLD to inject said library. Recent versions of macOS have new security measures which prevent that type of injection.
In order to work around this problem, the project needs to be configured with additional "entitlements". To do so, follow these steps: