Alert“Developer tools access needs to take control

2019-03-12 16:16发布

问题:

I am using OS X Mavericks with Xcode 4.6.3. I am running the app on simulator as i don't have a developer account. Whenever i run the project on simulator it keeps asking me "Developer tools access needs to take control of another process for debugging to continue. Type your password to allow this". The same issue i also experienced on OS X Mountain Lion with Xcode 4.6.2, so its definitely not related to the OS Version or Xcode Version.

I have gone through Stackoverflow's issue related threads,Q&A. Thanks

回答1:

The first time you launched XCode, it probably asked you if you wanted to enable Developer Mode on this mac. If you accepted, then it asked you for your password, and you stopped getting this kind of warning.

Chances are good that you declined, and now it has to explicitly ask you for permission every time it tries to do lots of common developer tasks.

Enabling "Developer Mode" has nothing to do with having an actual iOS developer account with Apple, it's merely a loosening of security restrictions on your mac. Effectively you are giving your mac permission to not ask you for a password during common developer tasks.

You can enable developer mode by opening terminal and typing this:

DevToolsSecurity -enable

It should prompt for your password, then you'll likely have to log out and back in for the setting to take effect.

That should stop the warnings!

EDIT

those of you averse to the command line can find similar functionality in the organizer window

Open the Organizer window in XCode (Shift Apple 2) and within the "Devices" tab you'll see "My Mac" listed. You can enable and disable developer mode with the click of a button there.



回答2:

The solution for mavericks is this command :

sudo security authorizationdb write system.privilege.taskport allow

Based on this post : http://www.ama-dev.com/xcode-build-command-line-remove-authorization-prompt-for-uiautomation/



回答3:

In case you are using older version of Xcode (below 6) type this command on terminal :

DevToolsSecurity -enable

This will prompt a dialog requesting system password. Enter password and you can see 'Developer mode is now enabled' log on terminal.

If you are using Xcode 6 (or above) it will automatically ask for enabling developer mode. Simply click 'Enable' to enable developer mode.