最近机器老嗡嗡地响,在Activity Monitor里一看,发现BTServer这个进程的CPU占用率180%多,数据明显异常。Google了一下,发现如下文章,我是按照其中的这个方法去改的:
Go to the Macintosh HD > Developer > Platforms > iPhoneSimulator.platform > Developer > SDKs > iPhoneSimulator5.0.sdk > System > Library > LaunchDaemons directory and then open the plist file from there. Locate the "Disabled" key and change its value from "false" to "true." (说明:需要获取修改权限,才能修改LaunchDaemons下的com.apple.BTServer.plist文件。在Terminal中用sudo vi即可修改)。
----------------------------------------------------------------------------------------------------------------------------------------
If you develop applications for Apple's iPhone or iPad, you may run into an issue where the Mac you're working on may start lagging or even lock up. If this happens, checking Activity Monitor may show the process BTServer running in the background.
For some people experiencing this problem, their Macs start running slower with the fans blaring at high speed, but for others the system crawls to a halt, requiring a forced reset of the system.
In order to properly test iOS applications, Apple includes an iOS simulator in its XCode package that is regularly used to launch and test code. This simulator tries to mimic every component of the iOS device, including the OS environment as well as the hardware components of the device.
The BTServer process is supposed to mimic Bluetooth hardware for the iOS simulator, and may have a bug or two, or otherwise be affected by the code that certain developers are using in their applications.
This problem happens on a number of different setups, but in a recent Apple discussion on the topic it appears to happen most for people running XCode 4.2 (the latest version) on Snow Leopard 10.6.8.
If the BTServer process causes repeated issues for you, then there are several approaches you can take: