ios 停止“开发人员工具访问需要控制另一个进程以继续调试”警报
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9132826/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Stop "developer tools access needs to take control of another process for debugging to continue" alert
提问by Heath Borders
I recently upgraded to 10.7.3, and when I try to debug my iOS project in the simulator for the first time after logging in, I'm prompted with the following two alerts:
我最近升级到了10.7.3,登录后第一次尝试在模拟器中调试我的iOS项目时,提示以下两个警告:
My user is an admin user. I never saw these alerts before. How do I get them to stop?
我的用户是管理员用户。我以前从未见过这些警报。我怎样才能让他们停下来?
EDIT
编辑
I've verified that I'm a member of the _developer
group using id -a
.
我已经_developer
使用id -a
.
回答by kenster
There's a much simpler solution for this. Try running the following command:
对此有一个更简单的解决方案。尝试运行以下命令:
sudo /usr/sbin/DevToolsSecurity --enable
回答by omxian
enable develoer mode: In Terminal run this: DevToolsSecurity -enable
启用开发者模式:在终端中运行:DevToolsSecurity -enable
回答by Heath Borders
Per Zev Eisenberg's answer, reinstalling Xcode 4.2.1 worked. However, it might be easier to just patch the /etc/authorization
file with the following diff.
根据 Zev Eisenberg 的回答,重新安装 Xcode 4.2.1 有效。但是,/etc/authorization
使用以下差异修补文件可能更容易。
<key>system.privilege.taskport.debug</key>
<dict>
<key>allow-root</key>
<false/>
<key>class</key>
- <string>user</string>
+ <string>rule</string>
<key>comment</key>
<string>For use by Apple. WARNING: administrators are advised
not to modify this right.</string>
<key>default-button</key>
<dict>
...
</dict>
<key>default-prompt</key>
<dict>
...
</dict>
- <key>group</key>
- <string>_developer</string>
<key>shared</key>
<true/>
- <key>timeout</key>
- <integer>36000</integer>
+ <key>k-of-n</key>
+ <integer>1</integer>
+ <key>rule</key>
+ <array>
+ <string>is-admin</string>
+ <string>is-developer</string>
+ <string>authenticate-developer</string>
+ </array>
</dict>
回答by Zev Eisenberg
Reinstalling Xcode 4.2.1 after upgrading to 10.7.3 seems to have fixed it for me.
升级到 10.7.3 后重新安装 Xcode 4.2.1 似乎为我修复了它。
回答by Emily
I modified the rule for system.privilege.taskport
and the alert doesn't show up anymore.
我修改了规则,system.privilege.taskport
警报不再出现。
- Open the file
/etc/authorization
. - Find the rule
system.privilege.taskport
. Under the line<key>class</key>
, change<string>rule</string>
to<string>allow</string>
- 打开文件
/etc/authorization
。 - 找出规律
system.privilege.taskport
。在该行下<key>class</key>
,更改<string>rule</string>
为<string>allow</string>
回答by Aks
I had same issue with my mac 10.12.5 & Xcode9 Run this command :
我的 mac 10.12.5 & Xcode9 也有同样的问题 运行这个命令:
sudo security authorizationdb write system.privilege.taskport allow
Then enter your password.. Check if it still prompt you. Good luck..
然后输入您的密码.. 检查它是否仍然提示您。祝你好运..
回答by Tim Johnsen
I just turned debugging off in (edit scheme) -> uncheck debug executable. But I also do all of my debugging on another console, so if you are developing and need the debugger then it wont help. I only have this issue with an old version of Xcode 8.2.1 since I am running the code on an old Mac using El Capitan.
我刚刚在(编辑方案)中关闭了调试-> 取消选中调试可执行文件。但我也在另一个控制台上进行所有调试,因此如果您正在开发并需要调试器,那么它无济于事。我只有旧版本的 Xcode 8.2.1 有这个问题,因为我在旧 Mac 上使用 El Capitan 运行代码。
Newer mac and Xcode version 10 doesn't seem to have this issue.
较新的 mac 和 Xcode 版本 10 似乎没有这个问题。
回答by dafi
Something has been modified on file /etc/authorization, I've a Lion without v10.7.3 and it has the following code
文件 /etc/authorization 中的某些内容已被修改,我有一个没有 v10.7.3 的 Lion,它具有以下代码
Lines 5807-5814
行 5807-5814
<key>k-of-n</key>
<integer>1</integer>
<key>rule</key>
<array>
<string>is-admin</string>
<string>is-developer</string>
<string>authenticate-developer</string>
</array>
After the update the file contains many modification due to new language supported but the lines corresponding to debugging authorization differ from the lines shown above in
更新后,由于支持新语言,文件有很多修改,但调试授权对应的行与上图所示的行不同
Lines 7675-7676
第 7675-7676 行
<key>group</key>
<string>_developer</string>
I can't apply these differences to my 10.7.3 Lion installation because it's a production machine and I can't risk to corrupt it
我无法将这些差异应用于我的 10.7.3 Lion 安装,因为它是一台生产机器,我不能冒险破坏它
I've all necessasy permission as shown from command id -a
如命令所示,我拥有所有必要的权限 id -a
uid=501(dave) gid=20(staff) groups=20(staff),
401(com.apple.access_screensharing),
402(com.apple.sharepoint.group.1),
12(everyone),
33(_appstore),
61(localaccounts),
79(_appserverusr),
80(admin),
81(_appserveradm),
98(_lpadmin),
100(_lpoperator),
204(_developer)
回答by zszen
no need code. no need reinstall xcode. Do these steps:
不需要代码。无需重新安装 xcode。执行以下步骤:
1.close xcode.
1.关闭xcode。
2.open Keychain access.
2.打开钥匙串访问。
3.double click your Keychain(the key icon which create from keychain.p12)
3.双击您的钥匙串(从keychain.p12创建的钥匙图标)
4.go to access control panel(name maybe not right)
4.转到访问控制面板(名称可能不对)
5.enable all app access this.
5.启用所有应用程序访问此。
6.save.
6.保存。
7.run your xcode project.
7.运行你的xcode项目。
8.it works well.
8.它运作良好。