20

Since I updated to XCode 6.2, when I try to run

xcodebuild -project Demo.xcworkspace -scheme Demo clean build test

I'm always getting:

iPhoneSimulator: SimVerifier returned: Error Domain=NSPOSIXErrorDomain Code=53 
"Simulator verification failed." UserInfo=0x7f82b9e091a0 
{
    NSLocalizedFailureReason=A connection to the simulator verification service could
    not be established., 

    NSLocalizedRecoverySuggestion=Ensure that Xcode.app is installed on a volume with 
    ownership enabled., 

    NSLocalizedDescription=Simulator verification failed.
}

Has anyone encountered this?

Screenshot

  • Same issue here - I see it when I build Swift framework with Carthage. It is reproducible on both Xcode 6.2 and latest Xcode 6.3 beta – Oleksii Taran Apr 6 '15 at 20:54
  • Simply restarting Macbook solved my problem – Jayprakash Dubey May 29 '15 at 13:14

11 Answers 11

21

Rather than simply delete the /Library/Developer directory, I updated the permissions on all instances of dyld_sim to match those that Jeremy from Apple mentions in this post. First, find all instances of this on your machine with the following command:

sudo find / -name dyld_sim

Then, check the permissions for each one:

ls -l "<file location\file name>"

If you don't see:

-rwxr-xr-x  1 root  wheel  

Then you will need to modify the permissions to match properly. In my case, the group ownership was wrong and listed as admin instead of wheel. Using

sudo chown :wheel "<file location\file name>"

to change the group ownership on each of the incorrect instances corrected the issue. If the issue is the flags and not ownership you will need to use chmod instead.

| improve this answer | |
  • 16
    My variation: find /Library/Developer/CoreSimulator -name dyld_sim -ls to check ownership; sudo find /Library/Developer/CoreSimulator -name dyld_sim -exec chgrp wheel {} \; to change ownership – Bob Mazanec Apr 29 '15 at 14:02
  • Michael explains the problem nicely @BobMazanec one liners solve the problem nicely – ajmccall Jun 10 '15 at 20:53
5

After trying both running the simulator (as suggested by Jeremy Huddleston Sequoia) and removing the unavailable simulators (as suggested by pwc) I still was getting no love.

Jeremy suggested it was a permissions issue with dyld_sim. So I went looking for dyld_sim files. I found two, one in /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.1.simruntime ... the other inside /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform ...

The 8.1 version under /Library/Developer was from October last year. Facing a reinstall I decided to remove the /Library/Developer/CoreSimulator directory (which only contained a profile for the 8.1 simulator) and see what happened.

All good. Carthage now build correctly for me.

My assumption is that Xcode build was getting a little lost and picking up the old one. SO nothing to do with permissions or unavailable simulators in my case.

| improve this answer | |
  • Thank you. After removing the /Library/Developer/CoreSimulator directory, it works well now. – AechoLiu Apr 30 '15 at 5:54
  • This fixed it for me as well. I had a leftover 7.1 simulator data. – jasonjwwilliams May 7 '15 at 22:51
  • An old 8.1 simulator profile at 2.5GB was the culprit for me. Permissions were fine however. Thanks. – GenericPtr Aug 4 '15 at 13:54
3

I was running into the same issue when trying to run carthage to build a 3rd-party library.

The error I was getting was:

2015-04-22 02:16:17.468 xcodebuild[944:9962] [MT] iPhoneSimulator: SimVerifier returned: Error Domain=NSPOSIXErrorDomain Code=53 "Simulator verification failed." UserInfo=0x7ffb237cf260 {NSLocalizedFailureReason=A connection to the simulator verification service could not be established., NSLocalizedRecoverySuggestion=Ensure that Xcode.app is installed on a volume with ownership enabled., NSLocalizedDescription=Simulator verification failed.}

I was reading a thread on the Apple Developer Forum and decided to check the simulators I had installed via:

xcrun simctl list

Doing so found a lot of simulators that were unavailable:

-- Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-8-0 --
    iPhone 4s (E4B99ABA-C455-4579-AFB6-9FFE4D7B2D9B) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5 (F4C1E6D1-102A-4E49-B8CB-6274258C8E55) (Shutdown) (unavailable, runtime profile not found)
    iPhone 5s (33C6AA80-EA85-41E8-928D-38598B87BBCB) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 Plus (293C225D-02C8-4458-BAEE-0F5ED76E308E) (Shutdown) (unavailable, runtime profile not found)
    iPhone 6 (C93CCB55-1DFB-4452-876D-663A8E85CBB8) (Shutdown) (unavailable, runtime profile not found)
    iPad 2 (DFC56B19-82F4-4587-95F5-E53154681689) (Shutdown) (unavailable, runtime profile not found)
    iPad Retina (AC5F3C69-9554-4A0A-84A7-81C586E7F0EC) (Shutdown) (unavailable, runtime profile not found)
    iPad Air (BD6C1EEB-9BCE-47BF-AC80-BD1AEFC61E06) (Shutdown) (unavailable, runtime profile not found)
    Resizable iPhone (37FBC485-B844-42DE-B77D-02995176E057) (Shutdown) (unavailable, runtime profile not found)
    Resizable iPad (B45EC16E-DB4D-4B0E-B969-90F468B673DA) (Shutdown) (unavailable, runtime profile not found)

I deleted each of the unavailable simulators via:

xcrun simctl delete [UUID]

(I copied that output from above and pasted into a text editor, deleted everything but the UUIDs, and prefixed each line with xcrun simctl delete.)

After doing that, I was able to run carthage without error.

| improve this answer | |
  • Deleting unavailable simulators is completely unrelated to the issue here. The only relevant thing that changed was that something connected to the service and thus made it such that the runtime was verified and permissions adjusted such that xcodebuild didn't need to on a subsequent run. The deletion of the unavailable devices happened to do that as a side effect. You could have also just run the iOS Simulator.app to fix the issue. – Jeremy Huddleston Sequoia Apr 22 '15 at 6:55
  • @JeremyHuddlestonSequoia Well, I tried everything in the Dev. Forum thread, including running the simulator. None of it worked. This did. – pwc Apr 22 '15 at 14:42
  • Well the only thing relevant is the ownership and permissions on dyld_sim. The existence of older devices is not relevant to the issue. If running the simulator app did not fix this for you, please file a radar and send me the radar number directly, so it doesn't get duped by someone to the xcodebuild issue. – Jeremy Huddleston Sequoia Apr 22 '15 at 16:56
  • This was the only solution that worked for me. Super weird, but bravo @pwc – Jordan Benge Apr 1 '19 at 21:32
2

Had the exact same problem. I managed to fix this by installing Xcode 6.3.1 (from AppStore), opening a project in Xcode and running it on the simulator.

After doing this I am now able to do the same using xcodebuild from the console. The error never went away though, but xcodebuild commands now work instead of remaining blocked.

| improve this answer | |
  • Just tried that myself and, indeed, the error is still there but it's ignored and the build carries on. Is it then a XCode 6.2 issue? – marius bardan Apr 22 '15 at 13:47
  • Had the same issue on 6.3 – Mihai Damian Apr 22 '15 at 14:33
0

sudo rm -rf /Library/Developer/*

I then downloaded XCode from the developer website, instead of the app store, and reinstalled. This fixed the issue for me.

| improve this answer | |
0

For me, this problem was caused by conflict of command-line development tools and also due to Mac OS folder permission issues with the tools.

I was able to resolve it following these steps:

  1. Quit any running instances of Xcode, Instruments and iOS simulators
  2. Removing the developer folder: /Library/Developer
  3. Remove all your Xcode installations: /Applications/Xcode.app,...
  4. Reboot your Mac
  5. Download Xcode.dmg from Apple Developer Portal (NOT from the App Store)
  6. Reinstall Xcode
  7. Launch Xcode

Optionally, though not the best thing to do, if you wanna install multiple versions of Xcode, make sure you activate the right Xcode version from Xcode Preferences/Locations/Command-Line Tools, before building your projects.

Hope this helps.

| improve this answer | |
0

Run iOS Simulator.app, and it will connect to the verification service and fix ownership and permissions on dyld_sim such that xcodebuild doesn't need to.

| improve this answer | |
  • What should the permissions be? – Kevin Apr 24 '15 at 5:47
  • root:wheel ownership, 755 permissions – Jeremy Huddleston Sequoia Apr 24 '15 at 5:48
0

Solution by @kevinoneill from https://github.com/Carthage/Carthage/issues/424 helped me. Just removed the /Library/Developer/CoreSimulator/ folder and no Xcode re-install was required anymore.

| improve this answer | |
0

Go to the folder where you have your project and do the following: chmod -R 777 ionic_test.

the problem is that you have root permission and xcode won't load files without permission.

| improve this answer | |
0

If you can't change ownership mode for dclim files it may be happening that you are running Xcode tools directly from .dmg file instead of installed version. (If it is true Xcode appears on devices tag in finder)

| improve this answer | |
0

Had the same problem here. Running xcodebuild after lauching Xcode.app solved my problem. Mentioned by JeremyHu in this post https://devforums.apple.com/thread/264762?start=25&tstart=0

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.