xcodeinstrumentsxcode-instrumentshackintosh

Using Xcode Instruments on hackintosh


Using hackintosh (i7-4790K 4GHz, 16GB DDR3, GF980Ti) for developing on Xcode (both Swift and Objective-C) about an year, never get any errors. But now I need to use Instruments apps (such Leaks, Allocations, Energy Log, System Trace, etc.) - but I can not! When I start ANY of these apps I see just transparent window without any visible information.

enter image description here


Solution

  • EDIT: as @Eike said in his answer, Instruments and other apps facing this issue work out of the box from 10.13 onwards. For 10.12, the NVWebDriverLibValFix kext is a better/less intrusive fix and avoid some permissions issues. This answer should now be considered obsolete.


    Instruments is a code-signed application distributed by Apple. Some of these applications are flagged so they refuse to load libraries that are not signed by Apple. The Nvidia Web Driver is not signed by Apple, so it's not loaded, resulting in the behavior you describe.

    The accepted answer tell you to work around the issue by loading another driver, signed by Apple. While this will certainly work, I prefer to do it the other way around : force Instruments to load the nvidia driver.

    You can re-sign the Instruments binary with the following command:

    sudo codesign -f -s - /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/MacOS/Instruments
    

    It will then load the Nvidia driver and run perfectly well.