Visual Studio Mac Error ! Custom Command Execution Failed - visual-studio-mac

I recently updated my Visual Studio for Mac and getting an error after build as "Custom Command execution failed". Any help appreciated !

I think the error was due XCode command line tools selection. This command fixed the problem.
~$ sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

Related

Xcode 8 Command Line Tools Missing (Git, Clang, etc)

Two days ago, I upgraded to OSX Sierra. My development tools seemed to be working fine after that.
However, today I upgraded Xcode 7.3.1 -> 8.1 to make certain features work for React-Native development. To be precise, I deleted the 7.3.1 and installed 8.1 anew. That is where the woes had started.
In particular, it seems that most of the Command Line Tools are gone. I get errors when trying to use git as well as other commands. I was able to get Git back after installing from .dmg file.
I have also tried installing Command Line Tools using xcode-select --install to no avail. Installation proceeds, but none of the tools become available afterwards.
As an example of what is happening, the following are the errors I receive when running: curl -sSL https://get.rvm.io | bash -s stable --ruby
xcodebuild: error: SDK "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk" cannot be located.
gcc: error: unable to find utility "gcc", not a developer tool or in PATH
configure: error: clang version 3.0 or later is required
Does someone know what the issue might be and how one goes about getting the development environment set up on Sierra + Xcode 8.1?
This error occurred after installing the new version of Xcode.
Just restarting helped for me. Sometimes, even quitting and restarting Terminal might also help.
The problem is that you need to repoint the command line tools to the new copy of Xcode. You can use xcode-select to do that, but the easiest way is, in Xcode, go to Preferences > Locations and choose the correct Xcode for the Command Line Tools pop-up menu at the bottom.
Also pls note that in order to use xcode-select you need to use sudo.

Receive an error message when I type rake run:iphone on my Mac terminal

I'm trying to build a Rhodes application for Iphones and I'm following a tutorial (http://docs.rhomobile.com/en/2.2.0/rhodes/tutorial). When I type in the command rake run:iphone in my terminal I receive an error message.
Error message:
can not found XCode command line tools
Install XCode to default location
For XCode from 4.3 and later - you should install Command Line Tools package ! Open XCode - Preferences... - Downloads - Components - Command Line Tools
I've installed Xcode several times and installed the command line tools so I'm not sure why I am continuing to receive this error.
Perhaps try bundle exec rake run:iphone
Have you accepted the Xcode terms of service?
In the past that has blocked things for me.
You can open command space, type xcode and try to run it to check.

Appcelerator - Xcode EULA has not been accepted. Launch Xcode and accept the license

I am running appcelerator 4.5.0 and xcode 7.2.1 on Mac OS X 10.10.5
Running an iOS app gives me:
[ERROR] : Xcode EULA has not been accepted.
[ERROR] : Launch Xcode and accept the license.
I ran sudo xcodebuild -license per: "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo." when using GCC
But the error persists.
I then (per: https://wiki.appcelerator.org/display/guides2/Uninstalling+Studio) uninstalled appcelerator by deleting:
/Applications/Aptana Studio 3
/Applications/Titanium Studio
/Application/Appcelerator Studio
and then (per https://archive.appcelerator.com/topic/474/how-do-you-uninstall-titanium-and-appcelerator-studio-completely-and-start-from-scratch):
rm -rf ~/.appcelerator
rm -rf ~/.titanium
sudo npm uninstall -g titanium
sudo npm uninstall -g alloy
sudo npm uninstall -g acs
sudo npm uninstall -g appcelerator
and uninstalled xcode with sudo /Developer/Library/uninstall-devtools --mode=all per: http://osxdaily.com/2012/02/20/uninstall-xcode/
and I deleted Xcode.app from my Applications folder.
After all that I redownloaded xcode via software update, ran sudo xcodebuild -license (typing accept at the end), then installed from the site Appcelerator_Studio.dmg and ran appc setup
But still the error persists.
Any ideas on how to fix?
MORE INFO: After reading https://archive.appcelerator.com/question/155502/using-the-titanium-cli-and-getting-error-you-have-not-agreed-to-the-xcode-license-agreements-please-run-xcodebuild--license I believe I have the same issue (still no resolution though).
Running:
xcodebuild -sdk iphonesimulator is successful but if I run:
appc titanium build -p ios -T simulator -Y iphone I get the same errors as above.
UPDATE based on #andre-m comment (referencing https://apple.stackexchange.com/questions/175069/how-to-accept-xcode-license):
I already mentioned that I have run sudo xcodebuild -license but I also tried:
sudo xcodebuild -license accept which gives no output and then I still give the error on the build;
sudo xcode-select -r no output, error;
sudo xcode-select --install outputs: xcode-select: error: command line tools are already installed, use "Software Update" to install updates but still errors;
sudo softwareupdate -l outputs:No new software available. and then still gives the error;
sudo xcrun cc outputs clang: error: no input files
UPDATE based on #fokke-appcelerator comment (note these results are the same on both a working and non-working machine):
xcodebuild -checkFirstLaunchStatus; echo $?; gives 0
sudo xcodebuild -checkFirstLaunchStatus; echo $?; gives 69
Deleted Xcode.app from Applications (again), reinstalled xcode 7.2.1 -> this time from xcode dmg file How to download Xcode DMG or XIP file? (previously via Software Update), opened Xcode and was not given any EULA dialog.
SOLUTION:
Following #fokke-appcelerator's second I logged the exit code, out, and err of https://github.com/appcelerator/titanium_mobile/blob/master/node_modules/ioslib/lib/xcode.js#L333 (which is located here: /Users/<my_user>/Library/Application Support/Titanium/mobilesdk/osx/5.2.0.GA/node_modules/ioslib/lib) and got: xcodebuild: error: invalid option '-checkFirstLaunchStatus' because that xcode.js script found an older version of Xcode (4.2.6) that was not removed by sudo /Developer/Library/uninstall-devtools --mode=all as it should have.
Removing the old version of Xcode and reinstalling the current version of Xcode and then reinstalling the simulators (Launch Xcode; Select Xcode > Preferences; Select the Downloads icon; Click the Install button next to the desired simulator), and reinstalling Appcelerator ...the problem is now solved.
Just as FYI. I Had same issue and it was because I had downloaded a beta version of xCode but had not opened it (still had current version installed too). Once I opened the beta and went through everything I was able to go back to appc and package app without errors.
We check if the EULA has been accepted here:
https://github.com/appcelerator/titanium_mobile/blob/master/node_modules/ioslib/lib/xcode.js#L332
Which runs:
xcodebuild -checkFirstLaunchStatus
And then checks the exit code.
Could you run the above command yourself and then echo $? to get the exit code? That should echo 1. If that is true, then unfortunately it seems like your Xcode installation has a problem.
Maybe reinstall Xcode and instead of using the terminal to accept the license, just open Xcode.
I don't see where you specifically say it, but like the message says, you did launch XCode since install/update and accept the EULA there, yes?

Original error: Could not initialize ideviceinstaller;

I worked out an "Hello iOS" app by Xcode and can test it by Appium on iOS Simulator. However, I got the following error message when I tried to test the same app on a real iPhone/iPad device.
A new session could not be created. (Original error: Could not initialize ideviceinstaller; make sure it is installed and works on your system) (WARNING: The server did not provide any stacktrace information)
Here are my environment.
xcode: 7.0.1
mac os: version 10.11
appium version: 1.4.13
I tried this command "brew install --HEAD ideviceinstaller" but got another error message.
configure: error: in `/private/tmp/xz20151012-43217-o3pk5w/xz-5.2.1':
configure: error: cannot run C compiled programs.
Any solution for it? Thanks!
The problem is solved by running these commands:
cd /usr/local/Library
brew update
brew install ideviceinstaller
Have you enabled Enable UI Automation in device Developer settings panel?
This worked for me using this version 1.4.13
Run in Terminal app:
ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)" <
/dev/null 2> /dev/null
press enter/return key. Wait for the command to finish.
Run:
brew install ideviceinstaller

Development Platform using PhoneGap on a Mac Pro

I am setting up a development platform using my Mac Pro. I have installed GIT, NODEJS, PhoneGap and Cordova. I have cloned a repository to my computer successfully and added the IOS platform. But when I go to build my project I get an error:
Command failed with exit code 2.
Is there something else I need to install?
here is my error:
bash-3.2# sudo -s
bash-3.2# phonegap build ios
[phonegap] executing
'cordova build ios'... Running command:
/Users/developer/PhoneBook/DOR_Phonebook_mobile/DorPhonebook/platforms/ios/cordova/build
xcode-select: error: tool 'xcodebuild' requires Xcode, but active
developer directory '/Library/Developer/CommandLineTools' is a command
line tools instance
ERROR building one of the platforms: Error:
/Users/developer/PhoneBook/DOR_Phonebook_mobile/DorPhonebook/platforms/ios/cordova/build:
Command failed with exit code 2 You may not have the required
environment or OS to build this project
Error:
/Users/developer/PhoneBook/DOR_Phonebook_mobile/DorPhonebook/platforms/ios/cordova/build:
Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
First off all, you don't need Cordova and PhoneGap because you just install the same thing with another name.
After you choosed the name which sounds better for you, you should solve your XCode Problem. There is already a question here on Stackoverflow -> Unable to use xcode-commandlinetools.
As i can see it over there, i first would recommend you to check whether you have installed the latest version of xcode and node. If you already have the latest version, try to re-install Xcode or try to run
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
After you did all like i said try to create a project again.

Resources