Skip to content

Conversation

@rosen-vladimirov
Copy link
Contributor

In some cases NativeScript CLI fails on all iOS related commands (build, run, debug, etc.) with error: NativeScript can only run in Xcode version 6 or greater.
This happens when user has correct Xcode version, i.e. 9 or greater, but the head command on their machine does not support -n flag. This happens when the head command is overwritten by some tool, so the head executable is not the original one used by macOS.
CLI has some obsolete code to check the Xcode version AFTER it has verified it in the doctorService. Delete this code and use sysInfo's getXcodeVersion, which does not rely on head command.

PR Checklist

What is the current behavior?

CLI fails to execute iOS related commands when the head command is not the original one from macOS.

What is the new behavior?

CLI is able to execute iOS related commands when the head command is not the original one.

Fixes issue #4440

@rosen-vladimirov rosen-vladimirov added this to the 5.3.0 milestone Mar 18, 2019
@rosen-vladimirov rosen-vladimirov self-assigned this Mar 18, 2019
@cla-bot cla-bot bot added the cla: yes label Mar 18, 2019
@ghost ghost added the new PR label Mar 18, 2019
In some cases NativeScript CLI fails on all iOS related commands (build, run, debug, etc.) with error: `NativeScript can only run in Xcode version 6 or greater`.
This happens when user has correct Xcode version, i.e. 9 or greater, but the `head` command on their machine does not support `-n` flag. This happens when the `head` command is overwritten by some tool, so the `head` executable is not the original one used by macOS.
CLI has some obsolete code to check the Xcode version AFTER it has verified it in the doctorService. Delete this code and use sysInfo's getXcodeVersion, which does not rely on `head` command.
@rosen-vladimirov rosen-vladimirov force-pushed the vladimirov/fix-get-xcode-version branch from ee127f4 to af090bd Compare March 18, 2019 07:40
@rosen-vladimirov
Copy link
Contributor Author

test cli-smoke

@rosen-vladimirov rosen-vladimirov merged commit 06fb512 into master Mar 18, 2019
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-get-xcode-version branch March 18, 2019 10:07
@ghost ghost removed the new PR label Mar 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants