Is there a way to remove the authorization prompt from command-line instances of Instruments (Xcode)?

前端 未结 11 1008
南笙
南笙 2020-12-02 07:53

I am currently using Instruments via a bash script to initiate the command-line interface to start up runs of the Automation plug-in.

With 4.2, this worked well en

11条回答
  •  遥遥无期
    2020-12-02 08:41

    I partially solved this issue. I run instruments from command line and have authorization prompt in GUI (once per session) + this in console (each time I run instruments):

    Instruments: Instruments wants permission to analyze other processes.
    Type your password to allow this.
    Name ([my-username]):
    Password:
    
    Failed to authorize rights (0x20) with status: -60007.
    2012-02-28 10:04:19.607 instruments[60398:1203] Failed to connect to
    local pid watcher service: (os/kern) failure
    

    I compared /etc/authorization file before and after upgrading to xCode 4.3. Apple replaced two keys:

    com.apple.dt.instruments.process.analysis
    com.apple.dt.instruments.process.kill
    

    with

    com.apple.instruments.process.analysis
    

    I edited /etc/authorization, added missing keys below new one and issue from console is solved. Unfortunately GUI prompt is still there.

    Mising keys:

    com.apple.dt.instruments.process.analysis
    
        allow-root
        
        class
        user
        comment
        Rights for Instruments
        group
        admin
        shared
        
        timeout
        36000
        
    com.apple.dt.instruments.process.kill
    
        allow-root
        
        class
        user
        comment
        Rights for Instruments
        group
        admin
        shared
        
        timeout
        5
    
    

    Hope this will point you to solve whole issue

提交回复
热议问题