问题
I have a warning in my build log in teamcity. I've updated Xcode on my CI-Server from 7.3.1 to 8. The step run successfully but I have this:
[Step 3/3] Starting: /Users/teamcity/local/teamcity-build-agent/temp/agentTmp/custom_scriptxxxxxxx
[Step 3/3] in directory: /Users/teamcity/local/teamcity-build-agent/work/yyyy
[Step 3/3] 2016-10-11 09:04:41.706 xcodebuild[18180:5010256] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Detected Xcode.app relocation or CoreSimulatorService version change. Framework path (/Applications/Xcodes/Xcode_8.0.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (303.8) does not match existing job path (/Applications/Xcodes/Xcode-7.3.1.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc) and version (209.19).
[Step 3/3] 2016-10-11 09:04:41.961 xcodebuild[18180:5010256] Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now.
How can i fix this warning?
回答1:
I had the same issue. I've to run both Xcode 7 (to build old version) and Xcode 8 (to build current develop branch) in my Jenkins server and I was having the issue all the time.
Solution:
launchctl remove com.apple.CoreSimulator.CoreSimulatorService || true
This happens because, even if you quit the simulator app, the service is still running. The above command is needed to remove the service called com.apple.CoreSimulator.CoreSimulatorService
. The || true
is to avoid failure when that service is not running.
回答2:
Encountered the same issue and solved with the following steps:
- Copy Xcode from the Applications folder to another location
- Delete the copy left in Applications & make sure no copies of Xcode remain
- Move the copy from step 1 back to the Applications folder
- Restarted machine
It appears that some value is not being set, since Xcode is not being installed through the App store.
来源:https://stackoverflow.com/questions/39972105/how-can-i-fix-this-warning-coresimulator-is-attempting-to-unload-a-stale-coresi