Using Xcode Instruments on hackintosh

前端 未结 3 1517
不思量自难忘°
不思量自难忘° 2021-02-01 09:10

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

3条回答
  •  甜味超标
    2021-02-01 09:26

    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.

提交回复
热议问题