XCode prerequisite version check failed? Unable to package app with Intune Packager - xcode9

Edit: It appears the latest Release Notes from Apple indicate massive changes with the build system. Currently, Intune's Package Manager hasn't been recently updated, so I don't expect a fix besides downgrading until update.
I just updated XCode and OSX and ran the Intune MAM packager as always, but now instead of succeeding, I get this:
Version of MACOSX is 10.13.5
XCode prerequisite version check failed: failure in executing the xcodebuild command.
Missing prerequisite.
Cause of the error to be provided for investigation:Error Domain=IntuneAppPackager Code=22 "XCode version 5 or greater is required to run this tool." UserInfo={NSLocalizedDescription=XCode version 5 or greater is required to run this tool.}
I already had to re-enable certs to match the profile, but this seems unrelated. I have the latest XCode and the build tools installed via default settings. I googled different parts of this error and nothing came back. This could be InTune's mam packager but the error itself is relatively specific in saying XCode Build tools.

Try this code in your terminal:
xcode-select -p, then check if that path is correct path of your Xcode.
If this doesn't work, try this code:
sudo xcode-select --switch /correct path of the xcode app.
For example:
sudo xcode-select --switch /Applications/Xcode_7.3.1.app/Contents/Developer
This is what I did, and it works!

I have Xcode installed via App Store and came across the same error after switching to a new version of Intune MAM Packager.
sudo xcode-select --switch /Applications/Xcode_7.3.1.app/Contents/Developer
That worked for me

Related

Xcode 13 instruments is not a developer tool or in PATH (React native)

I recently upgraded to xcode13, before which react native app was working fine for long time. However, after switching when I run in iOS, I am getting error "instruments is not a developer tool or in PATH" on command "xcrun instruments". I tried following commands (all with Xcode in quit status)
sudo xcode-select -r
it reset the xcode select path to
/Applications/Xcode.app/Contents/Developer
then I quit command line reopened and tried
xcrun instruments
got same error again, so tried switching
sudo xcode-select -s /Library/Developer/CommandLineTools
quit command line and tried again, still no success. each time i verified path change using command
sudo xcode-select -p
I opened instruments app using cmd+space and could see version as 13, same as Xcode.
That means matching instruments app(tool) exists but somehow xcrun is unable to find it which results in build failure.
FYI my react native version is 0.64.0. I saw couple of solutions like comment out flipper (which was not in my pod file though!) and add swift to library path in project.pbxproj, both solutions could not be applied.
Any suggestions would help.
I've been getting the same error no matter what I've tried. I think there might be an error on setting the command line tools path with the Xcode version 13. So deleting XCode 13 (How to uninstall XCode) and reinstalling 12.5.1.(XCode12.5.1) solved the problem for me temporarily.
The solution is to upgrade to 0.64 incase creating RN builds with Xcode 13 as Instruments have been replaced with xctrace only in 0.64's RN cli 5.0.1 (upgrade RN Cli as well), reference : RN Github solution comment

Nativescript doesn't recognize Xcode (High Sierra)

I'm on High Sierra with Xcode Version 9.0.1 (9A1004).
When running tns doctor I get the following warning:
WARNING: Xcode is not installed or is not configured properly.
You will not be able to build your projects for iOS or run them in the iOS Simulator.
To be able to build for iOS and run apps in the native emulator, verify that you have installed Xcode.
If I run the installation script, furthermore I get:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Xcode is not installed or not configured properly. Download, install, set it up and run this script again.
As you might have guessed, I have Xcode installed from the app store and I've also installed cocoapods and xcodeproj. This is the only warning that I get.
Any suggestions?
Run the following command:
sudo xcode-select --reset
I found this answer here:
http://overengineer.net/fixing-nativescript-s-xcode-is-not-installed-or-is-not-configured-properly-on-macos
I had this problem today, but running the recommended command didn't help. I found that running the command
$ tns doctor
walked me through a series of prompts and corrected the issue. I did have to restart my terminal after the program completed in order for it to take effect.
Open Xcode than go to Preferences -> Locations -> Command Line Tools after that it'll automatically take a path for the same. The system may ask for sudo password.

Xcode installing on mac

I am new to mac and I want to install Xcode. I have macOS Sierra Version 10.12.2. I found online that I have to run in terminal:
xcode-select --install
I did that but I get this:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
However, I can't find it in Application folder or with Spotlight Search and there is no Software Update to be done. Also, I found online that I have to download it from App Store and I am a bit confused. I can install it from terminal (and if so, why is it not working) or I have to download it from App Store?
Thank you!
xcode-select: error: command line tools are already installed, use
"Software Update" to install updates
It shows that your operating system has already installed xcode-select.
Finding your xcode-select. Go to Terminal and type
xcode-select --print-path
It shall return the location of your xcode-select to you:
/Library/Developer/CommandLineTools
Xcode: develop an app for Apple products
xcode-select: command-line tool
Depending on what you want to do with Xcode, xcode-select is way smaller than it, 8.1GB vs. nothing.
2018 and I had the same issue. Installing XCODE from the App Store did not resolve this.
I Had to download the command line tools for my XCODE and Apple Version.
https://developer.apple.com/download/more/
Searched for XCODE on that page above and picked the right version for me.
After installation of the DMG I could continue with Brew Installation.
You don't install Xcode from terminal, you have to go to develloper.apple.com in order to download the latest versions. Here's the link to save you some time:
Link to Xcode
Plus the version available depends on what Mac Osx version you have.
Was having the same issue after some system update, cannot even run things like make install.
verify your path by xcode-select --print-path, which might be /Applications/Xcode.app/Contents/Developer(need to be updated at last)
go to apple develper site, login, search command line tools, download the latest dmg, install. (better option than the 10+GB Xcode)
now update the path in step 1 by running sudo xcode-select --switch /Library/Developer/CommandLineTools.
verify again by running the xcode-select --print-path.
Now it should be good to go.

How to install Xcode 4.6 on Lion, needed for upgrading ruby with RVM

I was actually trying to update ruby on my OSX 10.7.5 with RVM, and after typing in the following command:
rvm install ruby
I got the following response:
Searching for binary rubies, this might take some time.
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ruby-2.0.0-p247',
please read /Users/username/.rvm/log/1381215459_ruby-2.0.0-p247/update_system.log
Requirements installation failed with status: 1.
Then, when I checked out the update_system.log, it showed me the actual code of a function called requirements_osx_brew_update_system(), which contained the following error message:
Xcode version older than 4.6.2 installed, download and install newer version from:
http://connect.apple.com
After installation open Xcode, go to Downloads and install Command Line Tools.
Then I proceeded to find an update for Xcode, but only found the latest Xcode 5.0, which is apparently incompatible with my OSX 10.7. Although ultimately my goal is to update ruby and install rails, which I'm sure there are many other ways to do, I'd still like to find out if I could possibly install Xcode 4.6.2 on my OSX 10.7.
UPDATE: Sorry folks, apparently my version of XCode is v4.6.1 so updating the command line tools will not work in all cases (I know for a fact it doesn't work if you're on XCode v4.3.3). YMMV
I ran into the same issue trying to do an rvm install. I got an error telling me that I needed XCode 4.6.2 or later.
Turns out all it needed was the latest version of the XCode command line tools. I followed the instructions for upgrading my command line tools from this macports article:
open the Xcode application
go to the Preferences window
open the Downloads section
click the Install button next to "Command Line Tools"
After doing this I was able to run my rvm install command and it didn't complain about upgrading XCode anymore (and finished successfully).
It seems you're going to have to install under Xcode 5. So go to https://developer.apple.com/downloads/ and log in with your developer ID to get to the older versions. There should be a 4.6.3 that you could potentially download, or even 4.6.2.
Or you could upgrade your OSX to 10.8.
Whichever you prefer.
I can't give you a direct link to it, since you need your developer information to log in yourself. But all the downloads you need are in the link provided above once you log in.
Open xcode and update it via the app store.
Then
xcode-select --install
This will install xcode via the command line

Setting environment variables to compile node on Mountain Lion with XCode4.4

After upgrading to Mountain Lion (10.8) and XCode 4.4, and installing the XCode Command Line utilities from the XCode Preferences pane, I was unable to compile node.js (0.8.5) from source. Specifically, the configure script believed that I did not have a C compiler installed.
It looks to me like the environment variables required for the command line tools were lost somewhere along the way.
I tried sudo xcode-select --switch /Applications/Xcode.app but this did not appear to clear up the problem.
I had to perform these steps to make the node build system happy:
export PATH=$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin
export CC='gcc --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/'
export CXX='g++ --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/'
After that I was able to compile and link.
So... why did I have to do this? Am I missing some easy step that could have done this for me automatically? Or am I in some bad state because I installed XCode before upgrading to Mountain Lion, and the XCode updater went off the rails?
Once you've updated to Mountain Lion and updated XCode 4.4, you have to reinstall the command line tools inside XCode.
Go to XCode/Preferences/Downloads/Components and click install on "Command Line Tools" and once it has downloaded and installed, you should once again have gcc and g++ in your (normal) path.
The correct thing to do was to reinstall the command-line tools from inside Xcode.
This was temporarily impossible because a malformed download list was being served by Apple, but the problem was fixed. The malformation was detectable by inspecting the output from Xcode in Console.
Once the tools were reinstalled, compilation worked normally.
http://docwiki.embarcadero.com/RADStudio/XE4/en/Installing_the_Xcode_Command_Line_Tools_on_a_Mac
Please refer the above link and try to install command line from apple developer portals

Resources