Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8198971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:04:33+00:00 2026-06-07T06:04:33+00:00

So I am running UIAutomation on command line with $ instruments -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate <path-to-your-app>/<appname>.app/

  • 0

So I am running UIAutomation on command line with

$ instruments -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate 
<path-to-your-app>/<appname>.app/ -e UIASCRIPT <path-to-your-js-test-file> -e 
UIARESULTSPATH <path-to-results-folder>

This works fine and the simulator opens up, and the app runs, but gets stuck with this error.

Failed to authorize rights (0x2) with status: -60007

I believe it has something to do with the permissions.

How do I go about this ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:04:35+00:00Added an answer on June 7, 2026 at 6:04 am

    That’s the answer I posted at Instruments via command line – jenkins

    And here is even a blog post about Xcode command line authorization prompt error

    I will explain it again here:

    What I did was the following:

    • Mark jenkins user as admin (unfortunately it seems that there is no other way atm)
    • Go to /etc/authorization
    • search for key system.privilige.taskport
    • change value of allow-root to true

      <key>system.privilege.taskport</key>
      <dict>
          <key>allow-root</key>
          <false/> // change to -> <true>
          <key>class</key>
          <string>user</string>
          <key>comment</key>
          <string>Used by task_for_pid(...).
          ...
      </dict>
      

    Now I am being able to use jenkins to run my UIAutomation-Tests via Command Line Script

    EDIT

    To make jenkins recognize a successfull build, I have not a perfect solution but the following workaround:

    ...
    echo "Run instruments simulator"
    
    instruments -t "$ORDER_AUTOMATION_TEST_TEMPLATE_PATH" "$FILE_DEBUG_APP" -e UIASCRIPT "$ORDER_AUTOMATION_TESTSCRIPT_PATH" -e UIARESULTSPATH "$DIRECTORY_INSTRUMENTS_RESULT"
    
    returnCode=0
    
    if test -a "Run 1/Assertion failed.png"; then
    echo "failed"
    returnCode=1
    else
    echo "passed"
    returnCode=0
    fi
    
    rm -fR "Run 1"
    
    rm -fR "instrumentscli0.trace"
    
    echo "Removing app dir"
    
    echo "$FILE_APPLICATIONS"
    
    rm -fR "$FILE_APPLICATIONS"
    
    echo $returnCode
    
    exit $returnCode
    

    EDIT 2
    Better way to check if automation test did run successfully:

    # cleanup the tracefiles produced from instruments
    rm -rf *.trace
    
    ##kill simulator afterwards
    killall "iPhone Simulator"
    
    ##check if failures occured
    # fail script if any failures have been generated
    if [ `grep "<string>Error</string>" "$WORKSPACE/Automation Results/Run 1/Automation Results.plist" | wc -l` -gt 0 ]; then
        echo 'Build Failed'
        exit -1
    else
        echo 'Build Passed'
        exit 0
    fi
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble running Instruments 4.3 from the cmd line. I believe it's picking
Running the following line in my script gives me a Permission denied error: $config_out
Can anyone point me to the documentation on how to make Instruments run UIAutomation
Is there any way to quit the iOS Simulator via a command line script?
Running the following code in Delphi XE2 Win32 platform works. However, the same code
Running test.py gives Traceback (most recent call last): File test.py, line 3, in <module>
Running thru examples of Enterprise Library 5.0 and when I use ExecuteNonQuery to run
Running a wordcount example provided by http://developer.yahoo.com/hadoop/tutorial/module3.html#running I am running hadoop on a VM
Running command manually: git log --pretty=format:%C(yellow)%h %Cred%ad %Cblue%an%Cgreen%d %Creset%s --date=short Using Bash 6bb9849 2012-08-05
Running Solr on Tomcat 7 on Win 2008 Server. I am looping through a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.