question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

could not determine ios sdk version

See original GitHub issue

The problem

error: Could not determine iOS SDK version

info: [debug] Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version

at ChildProcess.exithandler (child_process.js:744:12)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1008:16)
at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version\n)”,“cause”:{“killed”:true,“code”:null,“signal”:“SIGTERM”,“cmd”:“/bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version”},“isOperational”:true,“killed”:true,“code”:null,“signal”:“SIGTERM”,“cmd”:“/bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version”,“origValue”:“Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version\n”},“sessionId”:null} info: <-- POST /wd/hub/session 500 10039.177 ms - 525

error: Failed to start an Appium session, err was: Error: Command failed: /bin/sh -c xcrun --sdk iphonesimulator --show-sdk-version

Environment

  • Appium version with issue: 1.4.13 and i updated to 1.5.3 to check if it is solved
  • Last Appium version that did not exhibit the issue (if applicable): NA
  • Desktop OS/version used to run Appium: OS X el Capitan 10.11.5
  • Node.js version (unless using Appium.app|exe): v0.12.0
  • Mobile platform/version under test: ios 9.3
  • Real device or emulator/simulator: simulator iphone5 9.3
  • Appium CLI or Appium.app|exe:

Details

I am trying to run my maven tests on a simulator and at times it wouldn’t launch and give me this error i tried different solutions provided in previous answers like checking “use native instruments libarary” in the advanced ios tab, or check “use external nodejs binary” in developer settings, or resetting the simulator or restarting my machine and at times it works but this time i did all these and it still gives the same error Can you please explain to me what is the reason for this error and what is the correct way to solve it?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:29 (10 by maintainers)

github_iconTop GitHub Comments

7reactions
reply2sagarcommented, Oct 15, 2019

Execute 2 commands sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer xcrun --sdk iphonesimulator --show-sdk-version

Second command should retun the version of SDK. Then restart appium. This solved my problem

2reactions
BoazWarshawskycommented, Jun 2, 2020

The problem solved for me by doing these 2 commands:

sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer xcrun --sdk iphonesimulator --show-sdk-version

Like mentioned above.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Appium Error: Could not get Xcode version - Stack Overflow
I was using command line Appium. To resolve the issue you have to switch Xcode to the proper path. The following command will...
Read more >
Can't start a session : Could not determine iOS SDK version
Hi folks, last night my tests failed on iOS because "Could not determine iOS SDK version: Command 'xcrun --sdk iphonesimulator --show-sdk-version' timed out ......
Read more >
[iOS] [XCUITest] Error: Could not determine iOS SDK version
Below is the error: [XCUITest] Error: Could not determine iOS SDK version: Command 'xcrun' not found. Is it installed? at Object.
Read more >
SDK Path wrong | Apple Developer Forums
3. Go to the Search Paths section of the build settings, and check that an explicit reference to the SDK hasn't been added...
Read more >
Could not determine iOS SDK version - Code Grepper
Could not determine iOS SDK version : Could not get Xcode version. ... I was using command line Appium. To resolve the issue...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found